0

I have umask set to 002 in my Linux server and its working fine while I create file using touch. But I still have some files that are created with permission contrary to umask. These problematic files are created as a result of a script that is scheduled via cron; they have -rw-r----- permissions but they should have -rw-rw-r-- according to umask set to 002. Is there any other factor that controls permission other than umask?

The OS is SunOS usdyda01 5.10 Generic_150400-14 sun4v sparc SUNW,SPARC-Enterprise-T5220

  • SunOS usdyda01 5.10 Generic_150400-14 sun4v sparc SUNW,SPARC-Enterprise-T5220 are the OS details.. – Manisankar May 15 '15 at 0:32
1

The umask set in your session does not affect cron. (In fact, each session could have a different umask.) You would need to set the umask at the beginning of your script executed by cron.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.