Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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Žd like to know if this is possible. IŽd like to serve FTP (through vsftpd) with several users (between 5 and 10). But the plot is that I donŽt need them to be system users. IŽd like to create a list of possible ftp, and ftp only, users.
I want them to be only ftp users. For example they canŽt login through the terminal, because they wonŽt have a user account. I just want them to login through the ftp service, have a password assigned to them, and have a folder with write and read permisions. And I want them to be jailed in the /var/ftp folder. They canŽt go to /var, for exmaple.
for the list of user account, don't matter.
Just add user to the system, normaly, but make their uniq and default shell /usr/bin/ftp (at the end of the line which correcpond to them in the /etc/passwd).
To put them in a jail, "chroot" the directory :
put the tree they need and the program they need to be ftp client in the directory you prepare for ftp.
"chroot" these directory and when the user connect to the system (localy or remotely) they get a ftp prompt.
They connect to, and they fall in their root' directory (/ for them, /YOURPATH/ for real), with just a shell for ftp.
More information are discusses however on how to make it, but i just can put you in the right direction.
I posted wondering about the same thing ( http://www.linuxquestions.org/questi...hreadid=379667 ) and basically determined that the easiest way to do it was to setup the user on the system with no shell and set their homedir as the /ftp dir, then chroot them in vsftpd.
Someone did mention that you *might* be able to do it with pam but I wasn't able to find anything on it. It eneded up being just easier for me to add the user, assign them to /sbin/nologin and make their home dir /ftp
Originally posted by Palula What would be the command line to chroot a directory?
There may be a command line way to do it, but I did it within vsftpd. Since I didn't want to be put in the chroot jail, I ignored the chroot_local_users option and instead used:
chroot_list_file=/etc/vsftpd.chroot_list
Then I edited the vsftpd.chroot_list (or create if you don't have it) and listed each local user I wanted to be chrooted. VSFTP will automatically lock them into their home directory, and if you set their homedir to be whatever dif you want the ftp users to be put in, it'll send them there and show the path as /
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.