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!
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)).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:
anon_root=/NewDirectoryPath/ftp/