Legend: Owner/Group e.g. AccountUser/Nobody
On a web server (apache), I have a folder (chmod 775, AccountUser/Nobody) which I move uploaded files into. A web-based script running as Nobody is used when moving the files. Files that moved via this method gets chmod 644, Nobody/Nobody. This is OK because later I still can edit/delete/overwrite the file using either FTP (AccountUser) or the same Nobody script.
But when I upload a file in the folder using FTP (AccountUser), it becomes 644 AccountUser/AccountUser. This is not OK because I cannot later edit/delete/overwrite the file with the web-based script.
Since uploading files via FTP is much more convenient for a power user, is there a way to make the files uploaded via FTP to get chmod 664 AccountUser/Nobody no matter who creates it?
If you think the config I want is a bad way to solve this problem, please also suggest the proper way.