There is a particular program that creates files and directories with permissions 600 and 700, respectively. It creates them within its own working directory,
/home/me/program. I want those permissions to be 660 and 770 instead. The program is closed source, so changing it isn't an option. The umask is 002, so I know it isn't restricting the group permission. The program is simply specifying a restrictive permission on its own.
I considered setting a default ACLs, but it turns out that ACLs can only make a standard permission set more restrictive, not less.
I could probably react to file/dir creation events with inotifywait and issue chmod commands in response, but that feels kind of ugly.
I was hoping you guys would have a better way!
umask. Poking the binary is probably your best hope.
umaskcan remove permissions that a program specifies to
creator equivalent but cannot add them. If your Unix supports ACLs, and the program doesn't set them, I think a default ACL on the directory can't grant access to the owning group but can to another group or other user(s) which might suffice for you. Whether that is less ugly I offer no opinion.
umaskis set to, so the best way to proceed is impossible to know. If, for example, your system's
umaskis set to
077, setting it to
007would do what you want - assuming the program doesn't set it's own
umaskor explicitly set the file and directory permissions. To get a real "best answer", you need to provide a lot more information.