Skip to content

Instantly share code, notes, and snippets.

@Mouad-BGD
Created June 15, 2012 15:43
Show Gist options
  • Select an option

  • Save Mouad-BGD/2937119 to your computer and use it in GitHub Desktop.

Select an option

Save Mouad-BGD/2937119 to your computer and use it in GitHub Desktop.
vsftpd
If you're using vsftpd, you might find that you want to create accounts with access to FTP, but not to the shell (no ssh access, for example). So you might naively want to define the user's shell as /bin/false in /etc/passwd.
Unfortunately, that will block the user's access to vsftp as well as ssh. Instead, under RHEL and CentOS, you should use /sbin/nologin, which will block the ssh access, but continue to allow FTP access.
Even better, as I saw in one forum, you might make a symlink to /sbin/nologin and call it /sbin/ftp_only. You'll have to add /sbin/ftp_only to /etc/shells so it will be recognized as a valid shell. But the advantage here is that you'll be able to distinguish your FTP-only accounts from accounts that have been disabled for one reason or another.
ref:
http://www.cyberciti.biz/tips/rhel-fedora-centos-vsftpd-installation.html
http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-ftp-vsftpd-conf.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment