Todd Wade wrote: > From: Dave Howorth <[email protected]> > >> Todd Wade wrote: >>> My problem is because the umask is 0002, the files should be g+r,g+w >> The umask does not SET the mode, the umask MASKs the mode set by the >> application. > > Where did I say that a umask sets the mode?
Here: Todd Wade wrote: > This mask also says > 'allow the group to read and write the file'. >> It can't cause extra bits to be set. > > The app can explicitly set the mode for the file, ignoring the umask. Which > is > exactly what File::Temp does. You appear to have a fundamental misunderstanding of how modes are set and specifically of the interaction between what the application requests and what the umask allows. You need to reread the docs carefully. Try the man pages for open and umask and perhaps http://en.wikipedia.org/wiki/Umask >> You need to change the application if you want extra bits set. > > Or the app could honor the umask instead of explicitly setting the mode. Apps don't 'honour' umasks; the kernel applies them to whatever permissions apps ask for. In this specific case, I guess File::Temp is concerned about security of access, since it emphasises security in its POD. It sounds like you're trying to run TT processes under two or more different user ids. In general this is painful. I know because I do it myself sometimes in my development/testing environment and end up having to run chown and/or chmod frequently as Chad said. For a production system, it's better to arrange all processes under the same UID, IMHO. Cheers, Dave _______________________________________________ templates mailing list [email protected] http://mail.template-toolkit.org/mailman/listinfo/templates
