Results 1 to 6 of 6
Hello,
I have been struggling with this one all day. I hope someone can help. I have users that FTP into my RedHat Linux 9 system and can change directories ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-17-2004 #1Just Joined!
- Join Date
- Mar 2004
- Posts
- 3
Keeping FTP users in their home directory
Hello,
I have been struggling with this one all day. I hope someone can help. I have users that FTP into my RedHat Linux 9 system and can change directories to almost any directory on my system. I don't want to change rights on all my files, I would rather detain them in their home directory. Is there an easy way to do this? I am using VSFTP.
Any help is appreciated.
Stephen
- 03-17-2004 #2Linux Newbie
- Join Date
- Dec 2003
- Location
- Netherlands
- Posts
- 193
Add the following line in your proftpd.conf
DefaultRoot ~
It will solve your problemComputers Are Like Air Conditioners... They\'re both useless with Windows open!
- 03-17-2004 #3Just Joined!
- Join Date
- Mar 2004
- Posts
- 3
Will this work for VSFTP? I don't have a proftpd.conf, just a vsftp.conf...
Thanks,
Stephen
- 03-18-2004 #4Linux Newbie
- Join Date
- Dec 2003
- Location
- Netherlands
- Posts
- 193
Let me see, I'll search for it
Computers Are Like Air Conditioners... They\'re both useless with Windows open!
- 03-18-2004 #5Linux Newbie
- Join Date
- Dec 2003
- Location
- Netherlands
- Posts
- 193
You can control the 'lock to home dir' function for each ftp user by setting up a couple of parms in the vsftp config file:
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
Then, place the user names (one per line) you want to restrict in the /etc/vsftpd.chroot_list file. This lets users not listed in the file roam the directories. Very nice!
(Oh, by the way, keep the "#chroot_local_user=yes" line remarked out; you don't want the chroot_local_user parm active with the above config lines).
AND - I did add the /./ to the user's line in the etc/passwd file as well, so that may also be required for this solution to work (see above for details).
user
:501::/home/user:/bin/bash --> becomes -->
user
:501::/home/user/./:/bin/bash
Hope this is helpful!Computers Are Like Air Conditioners... They\'re both useless with Windows open!
- 03-18-2004 #6Just Joined!
- Join Date
- Mar 2004
- Posts
- 3
Very helpful, Thank you. It works like a charm!
Best Regards,
Stephen


Reply With Quote
