Let me first say that there are loads of topics regarding this, and I am sure i have seen them all by now. Still non of the solutions seem to help.
I installed vsftpd. created a user ftp-data. Now I need that files uploaded by user ftp-data would have 755 permissions. Solving this should be as easy as adding:
but that did not help, then I have tried a number of variations of this, still did not help.
The I added:
still did not help.
At the moment I think that I am missing something very simple and obvious, just cant find it. Maybe someone could help me to find what I am missing.
This is my config file:
anonymous_enable=NO local_enable=YES write_enable=YES local_umask=002 anon_upload_enable=NO anon_mkdir_write_enable=NO dirmessage_enable=NO xferlog_enable=YES connect_from_port_20=YES xferlog_file=/var/log/xferlog listen=YES local_root=/var/www/ftp-gallery pam_service_name=vsftpd userlist_enable=YES tcp_wrappers=YES
EDIT: Solved it. It was a problem with the client I was using. The FTP client itself was changing permissions :)