How to set Permissions and Owner/Group to be used for file creation?

1

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.

Jake

Posted 2015-06-09T06:12:59.243

Reputation: 1 587

Answers

1

Understanding can never be easy. Just visit this http://www.onlineconversion.com/html_chmod_calculator.htm After FTP, login with AccountUser/AccountUser and change permissions. Or conatct unix admin to change the default permissions given for the account.

VRVigneshwara

Posted 2015-06-09T06:12:59.243

Reputation: 277