Using CentOS 4.6:
Scenario: I have a dameon running as root that is constantly creating files and folders in lets say directory /some/directory. Since the files are being created by root, the permissions of those folders and files are determined by the root's umask, which is the default 644 for files and 755 for folders.
I have an application that accesses these files via samba and needs to be able to copy and delete the files. The samba username the application is using is mapped to a user let say 'app_user' which is unable to delete the files because of the permissions. I have added 'app_user' to the group 'app_group'
This is what I would Like to do:
I am hoping there is some way to configure the directory /some/directory so that all files and folders created are owned by the group 'app_group' and have write permissions for that group.
I do not have the option to run the dameon under a different username and I do not want to mess with the umask for root. I would prefer a solution that does not involve running a script to change the permissions. I just want my application to be able to copy and delete these files.
Thanks