Hawkoon
December 18th, 2010, 09:53 PM
I have a system with couple of local user accounts. I setup /etc/profile with umask 027 so that I can use groups to control if users can access files they don't own. It works great but now I find that cron saves stdout and stderr redirections with an effective umask of 022 (everybody has read rights).
My user cron tab looks like this:
SHELL=/bin/sh
# m h dom mon dow command
30 23 * * * /mnt/scripts/backup/eee_snapshots.bash >> /home/hawkoon/cron.msg 2>>/home/hawkoon/cron.errI don't want that everyone gets read permissions on these files but I am not sure how to configure this. Anyone got some ideas how to do this or why my umask setting in /etc/profile is overridden here?
I also see that redirections from rc.local too inherit read permissions for everyone. They are owned by root. Either the root umask needs to be configured some other place than /etc/profile or this refers to the same problem I am having with cron.
Thanks,
Hawkoon
My user cron tab looks like this:
SHELL=/bin/sh
# m h dom mon dow command
30 23 * * * /mnt/scripts/backup/eee_snapshots.bash >> /home/hawkoon/cron.msg 2>>/home/hawkoon/cron.errI don't want that everyone gets read permissions on these files but I am not sure how to configure this. Anyone got some ideas how to do this or why my umask setting in /etc/profile is overridden here?
I also see that redirections from rc.local too inherit read permissions for everyone. They are owned by root. Either the root umask needs to be configured some other place than /etc/profile or this refers to the same problem I am having with cron.
Thanks,
Hawkoon