I installed vsftpd and I can login with the new user sftp
to the server. But if I create a new file via FileZilla the new file has got 755 permission and its group is not www-data (33).
How can I fix this? I want to have correct permissions on new created or uploaded or modified files. And the group of new files and directories should be www-data.
/etc/vsftpd.conf:
# FTP
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
anon_upload_enable=YES
anon_mkdir_write_enable=YES
file_open_mode=0777
force_dot_files=YES
# SSL
ssl_enable=YES
rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
require_ssl_reuse=NO
ssl_ciphers=HIGH
Thanks.