i installed vsftpd and got it running with user ftpuser
. owner group of /var/www is set to ftpuser:ftpuser
. I can upload view, edit and delete files, which is nice.
but a website can't do anything: e.g. can't upload files via php, can't run installer and stuff.
so i changed owner to www-data:www-data
. Now i can upload files via http or update my wordpress.
but i can not change files via ftp anymore (550 Create directory operation failed).
i have added ftpuser
to group www-data
but still can't do anything on the server.
my vsftpd.conf
listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
force_dot_files=YES
pasv_min_port=40000
pasv_max_port=50000
allow_writeable_chroot=YES