Centos 5.4Сонфиг vsftpd:
anonymous_enable=no
local_enable=YES
write_enable=YES
local_root=/data
chroot_local_user=YES
session_support=YES
write_enable=YES
download_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
listen=YES
dual_log_enable=YES
syslog_enable=YES
log_ftp_protocol=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
guest_enable=YES
guest_username=region
#укажем папку для хранения дополнительных конфигов
user_config_dir=/etc/vsftpd/users/
virtual_use_local_privs=yes
# выставим нужные права
chmod_enable=YES
chown_uploads=YES
Сонфиг pam:
#%PAM-1.0
auth sufficient pam_userdb.so db=/etc/vsftpd/login debug
account sufficient pam_userdb.so db=/etc/vsftpd/login debug
session optional pam_keyinit.so force revoke
auth required pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed
#auth required pam_shells.so
auth include system-auth
account include system-auth
session include system-auth
session required pam_loginuid.so
Лог:
Nov 16 13:41:14 region vsftpd: pam_userdb(vsftpd:auth): Verify user `mytischi' with a password
Nov 16 13:41:14 region vsftpd: pam_userdb(vsftpd:auth): password in database is [0x867b160]`mytischi', len is 8
Nov 16 13:41:14 region vsftpd: pam_userdb(vsftpd:auth): user 'mytischi' granted access
Nov 16 13:41:14 region vsftpd: pam_userdb(vsftpd:account): password in database is [0x867b158]`mytischi', len is 8
Nov 16 13:41:14 region vsftpd: pam_keyinit(vsftpd:session): Unable to look up user "mytischi"
Nov 16 13:41:14 region vsftpd: pam_keyinit(vsftpd:session): Unable to look up user "mytischi"
Nov 16 13:41:14 region vsftpd: pam_unix(vsftpd:session): session opened for user mytischi by (uid=0)
Nov 16 13:41:14 region vsftpd: pam_loginuid(vsftpd:session): error: login user-name 'mytischi' does not exist