Users & FTP Access > Two Issues


The first thing…

What I want to do is to add linux users having both e-mail and ftp access. In "Edit Mail and FTP Users" menu, user accounts are successfully created.

But, even the "FTP login enabled?" is choosen as "Yes", the users cannot log in to ftp. On the other hand, if I assign a shell to that user like "/bin/sh" in the Webmin>Sytem>Users&Groups page, then the user can properly log in to ftp.

Here, the problem is that the "/bin/false" shell value given to a user by Virtualmin when creating a user, prevents a user to log in to ftp. How will it be fixed? :frowning:

The second thing…

An ordinary user with ftp access can view the whole sysem including all linux system files by navigating in the ftp.

I changed the "Limit users to directories" setting to "Home directory" for "Everyone" in the Webmin>Servers>ProFTPD>Files&Directories page. Unfortunately it did not work. :frowning:

Any help appreciated…


PS : My Webmin/Virtualmin is on Debian 3.1 Sarge.


For your first issue, it sounds like you need to add the /bin/false shell to /etc/shells. Doing that should allow your FTP users to log in.

Second, I don’t know the Webmin/Virtualmin way of solving this, but as a quick fix, I believe what’s missing from your /etc/proftpd.conf is a line like this:

DefaultRoot ~ !adm

That says that the default for all users – except those in the group ‘adm’, is to chroot to the users home directory.

You’ll probably need to restart proftpd after changing the above.