Hi everyone and thanks in advance.
So I got stuck with FTP response «550 Permission denied.»
System: Ubuntu 14.04
and vsftpd: version 3.0.2
I created a drupal
user for working over FTP, homedir: /var/www/vhosts/somedomain.com
Part of /etc/passwd
:
drupal:x:1005:65034::/var/www/vhosts/somedomain.com:/bin/false
VSFTPD conf /etc/vsftpd.conf:
listen=YES
listen_port=xxxx
anonymous_enable=NO
local_enable=YES
write_enable=YES
allow_writeable_chroot=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/nchroot
log_ftp_protocol=YES
secure_chroot_dir=/var/run/vsftpd/empty
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
tcp_wrappers=YES
pasv_enable=YES
pasv_min_port=1024
pasv_max_port=1048
pasv_address=x.x.x.x
user_config_dir=/etc/vsftpd/user_conf
guest_enable=YES
guest_username=vsftpd
All /etc/pam.d/vsftpd:
auth sufficient pam_pwdfile.so pwdfile /etc/vsftpd/ftpd.passwd
account required pam_permit.so
I tried to change permissions to 777 and the owner to drupal:drupal on /var/www/vhosts/somedomain.com/htdocs
Connection to FTP server seems to work and I can see a list of proper files and dirs, however I can't create a file.
In vsftpd logs I get: FTP response «550 Permission denied.»
Google keeps on telling me that it's either a permissions issue, or vsftpd.conf missconfiguration in
write_enable=YES
allow_writeable_chroot=YES
But in my case everything is set.
I'm thinking that I'm missing something in /etc/pam.d/vsftpd as it's customized by other guy.
Since you are using the guest_username option, the vsftpd.conf file needs to have the following line added:
virtual_use_local_privs=YES
from the manual:
virtual_use_local_privs If enabled, virtual users will use the same privileges as local users. By default, virtual users will use the same privileges as anonymous users, which tends to be more restrictive (especially in terms of write access).