I want to setup a ftp for couple of ftp-only users with vsftpd
. I configured the FTP to enable local user access. It works fine. But once I edit the users' shell to /usr/sbin/nologin
, it couldn't log into the FTP with the following error:
Response: 220 Welcome to the Scent Library's File Service.
Command: USER marketftp
Response: 331 Please specify the password.
Command: PASS ******
Response: 530 Login incorrect.
Here is what I have done:
-
All ftp-only user will have
/srv/ftp
as their home directory.The directory information is/srv/ftp: drwxr-xr-x 3 root slftp 4.0K 2012-02-09 17:20 ftp/
-
All the ftp-only users will be in the group
slftp
;I created the user with
adduser
and ended up with this/etc/passwd
entry:marketftp:x:1001:1001::/srv/ftp:/usr/sbin/nologin
And this in
/etc/group
:slftp:x:1001:marketftp
-
The
vsftpd
is configured with the following to limit the user to their own home except local users in thevsftpd.chroot_list
:chroot_local_user=YES chroot_list_enable=YES chroot_list_file=/etc/vsftpd.chroot_list
Where is my problem? As the FTP could be logged in by normal local users, the connection is fine. But why couldn't the ftp-only user login?
Best Answer
Taken from here
Q) Help! Local users cannot log in.
You are Case A4