Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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"
share|improve this question

1 Answer 1

The guy in this question has a similar issue and configuration. The correct answer there is to comment out the following in your /etc/pam.d/vsftpd

auth    required    pam_shells.so
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.