vsftp login errors 530 login incorrect

Posted by mcktimo on Server Fault See other posts from Server Fault or by mcktimo
Published on 2012-02-29T16:23:53Z Indexed on 2013/10/20 3:57 UTC
Read the original article Hit count: 505

Filed under:
|

Using Ubuntu 10.04 on an aws ec2 instance. I was happy just using ssh but then a wordpress plugin needs ftp access...I just need ftp access for one site www.sitebuilt.net which is in /home/sitebuil.

I installed a vftpd and pam and followed suggestions that got me to the following state

/etc/vftpd.conf

listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_file=/var/log/vsftpd.log
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/private/vsftpd.pem
guest_enable=YES
user_sub_token=$USER
local_root=/home/$USER
chroot_local_user=YES
hide_ids=YES
check_shell=NO
userlist_file=/etc/vsftpd_users

/etc/pam.d/vsftpd

# Standard behaviour for ftpd(8).
auth    required    pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed

# Note: vsftpd handles anonymous logins on its own. Do not enable pam_ftp.so.

# Standard pam includes
@include common-account
@include common-session
@include common-auth
auth    required    pam_shells.so
# Customized login using htpasswd file
auth    required pam_pwdfile.so pwdfile /etc/vsftpd/passwd
account required pam_permit.so

session    optional     pam_keyinit.so    force revoke
auth       include      system-auth
account    include      system-auth
session    include      system-auth
session    required     pam_loginuid.so

/etc/vsftpd_users

sitebuil
tim

/etc/passwd

...
sitebuil:x:1002:100:sitebuilt systems:/home/sitebuil:/bin/sh
ftp:x:108:113:ftp daemon,,,:/srv/ftp:/sbin/nologin

/etc/vsftpd/passwd

sitebuil:Kzencryptedpwd

/var/log/vftpd.log

Wed Feb 29 15:15:48 2012 [pid 20084] CONNECT: Client "98.217.196.12"
Wed Feb 29 15:16:02 2012 [pid 20083] [sitebuil] FAIL LOGIN: Client "98.217.196.12"
Wed Feb 29 16:12:33 2012 [pid 20652] CONNECT: Client "98.217.196.12"
Wed Feb 29 16:12:45 2012 [pid 20651] [sitebuil] FAIL LOGIN: Client "98.217.196.12"

© Server Fault or respective owner

Related posts about ftp

Related posts about pam