ftp from command line fails to get dir

chuee

Verified User
Joined
Mar 13, 2009
Messages
6
From my ftp clients I successfully upload by using:

Code:
HOST: ftp.mydomain.com/
REMOTE FOLDER: public_html/mydomain.com/

from the command line, using
Code:
ftp://ftp. mydomain.com/public_html

puts files to the wrong directory somewhere in the system - a non- public_html directory! I can find these in the DirectAdmin File Manager in public_html which contains:
- mydomain.com ( which has a folder with a red arrow next to it, a symlink?)
- any file I upload

from the command line, using
Code:
ftp://ftp.mydomain.com/public_html/mydomain.com/
doesn't work, probably because its a link..and i get error:
Absolute remote directory is /public_html/mydomain.com/
Could not change to remote base directory /public_html/mydomain.com/

The reason I want to use the command line (a perl ftpsync script) is to save updating either one file at a time, or the whole lot.

Any suggestions?:o
 
Last edited:
Code:
ftp://ftp.mydomain.com/domains/mydomain.com/public_html/
 
Code:
ftp://ftp.mydomain.com/domains/mydomain.com/public_html/
Thanks Floyd- nice try. Returned this error:
Code:
Absolute remote directory is /domains/mydomain.com/public_html/
Could not change to remote base directory /domains/mydomain.com/public_html/
 
It was not a try. If I am guessing I tell people so. Otherwise it is something that I have actually tried and worked.

If ftp://ftp.mydomain.com/domains/mydomain.com/public_html/ does not work then your server is not set up in the default manner.

Command line is a little different but the path is still the same.

ftp ftp.mydomain.com
username
password
cd domains/mydomain.com/public_html

Now you can run standard ftp commands in the public_html directory of mydomain.com

If you are using perl to do it then you need to tell us what perl code you are using to do it.
 
I searched "Absolute remote directory is" and found that the error is specific to the ftpsync.pl script. You are probably not filling in the variables there correctly. You are having a problem using ftpsync.pl not the general linux ftp command.
 
It was not a try. If I am guessing I tell people so. Otherwise it is something that I have actually tried and worked.

Much appreciated Floyd. I rather suspected, that you knew your stuff.

Code:
I searched "Absolute remote directory is" and found that the error is specific to the ftpsync.pl script. You are probably not filling in the variables there correctly.
Right. I had that down as a possibility. I've attached the perl script (32kb) to this message, in case you want to take a look.

There are few if any options that I know of - or found - in terms of alternative perl ftp synchronisation scripts (surprise is often expressed); there is a python script on macports I may try instead, but I prefer to stick with perl. The script works well elsewhere, but probably needs tweaking here. I am new to Direct Admin servers, and so have to learn - though I must say I find the server well set up and useful. My provider doesn't allow ssh though (Aushost).
If you do look at the code and make suggestions, naturally I'd be very grateful to you. I'm sure I may crack it, but not a at first look, or without banging heads together.
 

Attachments

Back
Top