Yo! I've a ftp server on my linux machine and I've set the following rules: I keep group and owner and chmod it to 775. When I use it at home (192.168.x.x) it's ok, files keep their group and user owner and chmod@775, but when I use it outside (at work for example, I use filezilla portable client), ftp connexion (that I use at home) fails and I need to use sftp, and uploaded files are with the good group and owner but with 755 permissions (the server is configured to chmod files to 775)...And I can't create directories (but of course it works at home, server configured to allow dir creation).
vsftpd.conf:
listen=YES
connect_from_port_20=YES
use_localtime=YES
xferlog_enable=YES
dirmessage_enable=YES
ftpd_banner=myftp.
anonymous_enable=NO
local_enable=YES
write_enable=YES
nopriv_user=publichttp
secure_chroot_dir=/var/run/vsftpd/empty
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list #empty file
allow_writeable_chroot=YES
userlist_enable=YES
userlist_deny=NO
userlist_file=/etc/vsftpd.user_list
anon_upload_enable=YES
anon_mkdir_write_enable=YES
local_umask=002
file_open_mode=0777
thanks to anyone who have a look at this.