I'm running a Ubuntu 10.04 LTS server and I want to create users who can only access the server from FTP.
What I did so far is:
- Install
vsftpd
- Create new user with default login shell set to
/bin/false
The normal users on the server are all able to access their home folder through ftp but the users to whom remote shell access is removed by setting it to /bin/false
are not able to log by ftp either.
I don't understand how the shell access affects the vsftpd
server? How could I enable the ftp access without re-enabling shell?
Update:
I found this reference that states that I should use /sbin/nologin
(seems to be /usr/sbin/nologin
in Ubuntu) and that it should not affect ftp access but it does not work in my case.
Best Answer
I don't know if it is good practice to answer my own question but I found a simple solution that enables ftp login.
I needed to add the line
to the file /etc/shells. Right after this modification the ftp server started to accept login from users to whom the shell is set /usr/sbin/nologin. So they cannot login through ssh but it works with ftp exactly as I wanted.
Thanks for your helpful comments.