Since several years I have a home-server, mainly to share files over the LAN.
So it all started with a cronjob, that runs every 5 minutes and sets all desired permissions and ownerships recursively for certain directories.
Since then the idea developed further and the code on GitHub right now is the 4th rewrite.
Besides the obvious functionality of experms, this project serves primarily to teach myself first bash and then python.
Monitors file-changes happened in the directory set in experms.conf. If changes happened, it adjusts the file-permissions and ownership/group.
You can define directories (and also sub-directories) with different ownerships and permissions.
It also allows exclusions based on directories or patterns (regex). Further it is able to restore all the ownerships and permissions of all files based on the config-file.
experms needs to be run with root-permissions.