Re: umask of files created in COMPILE_DIR
"Larry Leszczynski" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.template-toolkit |
|---|---|
| Message-ID | <[email protected]> |
Hi Todd - On Thursday, September 08, 2011 8:31 PM, "Todd Wade" <[email protected]> wrote: > > touch lets the system set the permissions, File::Temp sets the mode of > the file explicitly. > > Is that accurate? Not exactly... It's true that File::Temp sets the mode of the file explicitly, because it creates the file as 0600 (at which point umask would be applied) and then explicitly does a "chmod 600" (overriding any effect umask would have had). touch does not let the system *set* the permissions. touch creates the file with 0666 and lets the umask *remove* permissions. A umask of 0002 does not mean "apps should create files with 0664", it means "if apps create files, remove o=w permission from them". It's up to the app to decide what permissions to use when creating the files in the first place. Larry