Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi,
When we connect to ftp server, it drives to /var/ftp/
If we connect as user it drives to users's home directory.
Now i want to change the user's path to /var/www/. How can we do it?
Thankyou.
Distribution: Gentoo, Ubuntu, RHEL, CentOS, BSD, Solaris
Posts: 82
Rep:
It would help to have a little bit more information on what ftp daemon you're using as well as what system distro you're using.
I like pure-ftpd because its very simple for my users, when I setup a new account I just set their home directory to the path /opt/www/theirsite and then pure-ftpd inherits the rest. However it is possible with pure-ftpd, vsftpd, and others to define a ftp directory that is different from the users' home directories.
My distro is RHEL5 and it is vsftpd. User should be in /home directory. When he logedin through ssh or telnet, he has to go to his home directory. But if he logsin as ftp he has to login to /var/www.
Distribution: Gentoo, Ubuntu, RHEL, CentOS, BSD, Solaris
Posts: 82
Rep:
Its been a little while since I've setup a vsftpd.conf file like I said I made the switch to pure-ftpd an never looked back, its more secure and way easier to setup. However I believe what you need to do is add a line to your vsftpd.conf that looks like this:
local_root=/home/$USER
or
local_root=/home/ftp/$USER
I'll setup vsftpd on a server tomorrow and test around with it, let me know if this fixes your problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.