Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have apache installed on my ubuntu machine. you can access the server from other machines with http://linux-server The local path on the machine is /var/www I have installed vsftpd on the machine as well so I can ftp to the server from another machine with ftp://linux-server however it takes me to /home/myUserName I want the ftp to take me to the same place as the http. So how can I change the FTP path?

Thanks!

share|improve this question

2 Answers 2

up vote 2 down vote accepted

When you login as a user, vsftp will default to putting you in that user's home directory. If you want to ftp to linux-server and have it drop you into /var/www, the easiest way would be to create an FTP user who's home directory is set to /var/www.

Alternately, a better solution might be to setup anonymous FTP, and make the anonymous FTP directory be /var/www/ (assuming you don't need it to be restricted and secured (of course, if you do, you should be using ssh/scp/sftp)).

share|improve this answer
    
thanks, can you go into further detail about how to add a new user and set its home directory to /var/www. Thanks!! –  JD Isaacks May 25 '10 at 21:52
1  
'useradd' is the command you want. useradd -d /var/www newuser will create an account named 'newuser', with the correct home directory. Then use passwd newuser to change the account name. This all assumes you have root on the box. –  Christopher Karel May 25 '10 at 22:35
    
Awesome thanks!!! –  JD Isaacks May 25 '10 at 22:41

the anonymous FTP directory be /var/ftp/ , you want to chang to other directory than do :

vi /etc/vsftpd/vsftpd.conf

  anon_root=/NewDirectoryPath/ftp/
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.