I am setting up a Centos 6.8 VPS to run a website plus it's staging and dev versions. We have some SSH users (authentication is key-only), and I am trying to set up a user (call them foo) for FTP access to all the sites. foo does not have ssh access or a /home/foo directory (does this mean they are a virtual user?
All the site directories beneath /var/www/ have owner foo, group www. (the same person maintains them all, so I see no need to have multiple users)
I'm using vsftpd, but am getting an error 500 OOPS: cannot change directory:/home/foo
SELinux is disabled
vsftpd settings are:
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
chroot_local_user=NO # me experimenting!
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
I've obviously missed a step or two - what are they?
EDIT I have now set up TLS, made it mandatory, and set the home directory for user foo to /var/www. Filezilla is logging in fine, but timing out while trying to retrieve a directory listing.
Status: Connection established, waiting for welcome message...
Status: Initializing TLS...
Status: Verifying certificate...
Status: TLS connection established.
Status: Logged in
Status: Retrieving directory listing...
Command: PWD
Response: 257 "/var/www"
Command: TYPE I
Response: 200 Switching to Binary mode.
Command: PASV
Response: 227 Entering Passive Mode (103,194,112,34,77,0).
Command: LIST
Error: Connection timed out after 20 seconds of inactivity
Error: Failed to retrieve directory listing
I set log_ftp_protocol=YES, but xferlog is empty.