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


Click here to return to the '10.3: Set the global umask default value' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.3: Set the global umask default value
Authored by: samvenning on Jun 26, '04 11:09:15PM
Hmmm. There have been some very interesting solutions suggested for this problem. I quite like the default permissions... except for files in the Public folder. So I opted for a root cron job.

I added the following job to the system (root) crontab file (/etc/crontab)

# Make files in Public folders read/write for all
*/1 * * * * root /bin/chmod -R a+rw /Users/*/Public
Note: Each extended space (ie up to 'root') in the line above is actually a tab.

What does this do? Every minute, on the minute, this system (root) cron job makes all files and directories in users Public folder read/write by all (User, Group and Others).

The crontab file can easily be distributed company-wide using Apple Remote Desktop software (a very useful product indeed).

This problem is really frustrating for users in a peer-to-peer workgroup. I think Apple should provide a few permission options/settings for the Public folder.

---
---
Melbourne, Australia

[ Reply to This | # ]

10.3: Set the global umask default value
Authored by: taxi on Jun 27, '04 12:38:20AM

I have a similar thing set up to allow shared R&W access to am iTunes library, and I have a sneaking suspicion that chmod barfs when more than about 2000 files are being processed.

A nicer method would be to only change files that have the wrong permissions:

find /Users/*/Public/ -not -perm 664 -exec chmod 775 {};

but this gives me an error about not being able to find the semi-colon under bash!

I tried playing with csh & tcsh, but wildcards appear to work differently!



[ Reply to This | # ]
10.3: Set the global umask default value
Authored by: jtrott on Aug 02, '04 12:42:37AM

You need to escape the ; in bash, use {} \; at the end of your line, that will work.
Thanks,
JT



[ Reply to This | # ]