I'm running an OS X machine as a file server for several people in an office. There's a folder we use as a "common" area, where we want one user to be able to stick a file and have another modify it. The problem is that by default, OS X sets permissions of such files as writable by owner only. To get around that, I came up with the following for my crontab file:
0 * * * * echo password | sudo chmod -R 777 /ThatFolder/* > /dev/null
so that every hour, it'd fix the permissions on all files/folders within ThatFolder, and silence sudo's password prompt. Worked like a charm. But it wasn't triggering fast enough for users, so I decided to have it trigger every 10 minutes or so, did a little Google research, and came up with:
*/10 * * * * echo password | sudo chmod -R 777 /ThatFolder/* > /dev/null
It seemed to work. But next time I checked the admin's email, there was a flood of cron messages that just said "Password:", every 10 minutes. I tried changing the 10 to a 2, and that shut it up. 3 and 4 also worked fine. But setting it to */5 (or 0-59/5, makes no difference) or higher generates emails again.
I'm completely baffled. Anyone have any ideas?