Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


share|improve this question
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
'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 is /var/ftp/. If you want to change it to another directory, do:

sudo vi /etc/vsftpd.conf

or in some cases:
sudo vi /etc/vsftpd/vsftpd.conf

and edit this variable:

share|improve this answer

Your Answer


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.