less than 1 minute read

If you use ProFTPD in either traditional FTP mode or in the fairly new SFTP mode (not to be confused with FTPS) then you read a lot that its not possible to grant a user access without giving them Shell access through SSH. This is actually not true and is perfectly possible. Here is the solution:

As root run the following commands (tested on Ubuntu 14.04 LTS)

ln -s /bin/false /sbin/nologin

echo /sbin/nologin >>/etc/shells

Finally edit the user(s) in /etc/passwd so they use the /sbin/nologin shell.

Vola! - Even if you try to switch to that user from root it won’t work but you will be able to FTP / SFTP in.

Leave a comment