Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'An AppleScript to modify user permissions' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An AppleScript to modify user permissions
Authored by: taxi on Mar 11, '05 10:58:56PM

I used to store all of my Music in the shared directory, but found that sometimes various programs (iTunes) would set certain files to be owned by certain users.

I created a 'Shared' user, and added all users to the 'shared' group. Then I set up a crontab entry that automatically made all files in the Users/Shared/Music directory belong to user shared, and have the right permissions.

Something along the lines of:

find /Users/shared/Music -not -user "shared" -exec chown shared:shared {} \;

But I'd need to check it, so don't type this in...without checking it out first.



[ Reply to This | # ]
An AppleScript to modify user permissions
Authored by: taxi on Mar 12, '05 05:59:54AM

The command I use to change owner is:

find ~shared/Music -not -user shared -exec chown shared:admin {} \;

The command to change permissions:

find ~shared/Music -type d -not -perm 775 -exec chmod 775 {} \;



[ Reply to This | # ]