1

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

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

1 Answer 1

2

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .