Hi,
I've searched and read, and searched and read some more; but I'm still not connecting the dots or understanding what I need to change.
I have a script that creates a file. If I run it as root, the file gets created with 644 permissions like I want. That seems to make sense (at least I think
), as when I type umask, it returns 022. So, new files would be created with 666, but the 022 umask is being applied against it and resulting in a file with 644.
However, if I run it from cron, the file gets created as 600. Like there is an 066 umask being applied against it. Is it simply that there's a different umask in force for files created by cron? If so, where would I find and edit it?
Or is it a matter of the permissions on crontab itself? The one in /usr/bin and /ibin are both owned by root, with a group of root and both have 777 permssions.
There's a lot of info out there on cron jobs and permissions, but most seems centered around the cron job not running. Mine runs, it's just creating files with different permissions than I.
Any input is appreciated.
Thanks,
David