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.
I'm setting up an FTP server on my Fedora Core 1 workstation so I can easily transfer files between home and school. However, because of the fact that FTP is insecure, I would like to set it up so that all users are guest users, and are chrooted to a directory, ftpdrop, in their home directories (this comp gets used by myself and a couple other people). I have gotten the Washington University FTP daemon (wu-ftpd) working, but am not sure how to accomplish this. I have all users set as guest users in the /etc/ftpaccess file, but how can I still have all the users to be able to log in regularly, ie not change their default shells in /etc/passwd so they are only chrooted in the FTP session? I checked the docs but couldn't find anything on this.
I haven't touched wu-ftpd for a long time. I've been using vsftpd (which I must say is VERY easy to chroot users). Anyhow, to chroot for wu-ftpd:
1. Edit your /etc/passwd file and change the shell of the user to ftponly. Like /bin/ftponly. If you don't have ftponly, create one. Lots of info on how to do this is on the web. It's very easy.
2. Edit /etc/passwd to look something like this:
user:*:100:100:Test user:/home/user/./:/bin/ftponly
The /./ determines where the chroot() is done to. Therefore, when 'user' ftps in, they should be chrooted to their home dir. Try that out and let me know if it works or not.
I've gotten that to work for a couple of users already, but it is not what I am trying to do. I only want the chroot to apply to ftp sessions; ie when a user logs in he or she sees the directory $HOME/ftpdrop as the home directory, and is not able to go anywhere else, not even back to the $HOME directory. However, I would still like a the user to be able to log in, either through the consol or through shh, and use the box as you normally would. Thus, I am trying to create a "drop box", where local users can log in remotely to put a file in a directory under their home directory, and then move the file to another location when they come back to log on to the computer locally.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.