

4·
6 months agoAh, I see. Well its ugly, but you could inotify to trigger a tiny script to update the perms when files are added or copied to the share dir.
Free Software Enthusiast


Ah, I see. Well its ugly, but you could inotify to trigger a tiny script to update the perms when files are added or copied to the share dir.


I’m pretty sure you can do this by adding default user entries to the directory acl which will then be set on files added to that dir.
Running the inotify script as a service as root would require only one instance. You could trigger it on close_write and then run setfacl to add ACL entries to the new file for all the share users.
If you can’t add a daemon or service to the system then you can skip inotify and just slam a cron job at it every minute to find new files and update their perms if needed. Ugly but effective.
Another option to consider: You could write a little script that changes umask, copies files, and changes it back. Tell people they must use that “share_cp” script to put files into the share dir.