On Wed, 29 Sep 2004, Bob Showalter wrote:

> Gunnar Hjalmarsson wrote:
> > 
> > If the program, for some reason, requires that a file it creates has 
> > certain permissions, isn't it better to have the program set those 
> > permissions?
> 
> Why would the program itself require this? Perhaps the way I'm _using_ 
> the program requires this, but then let me control the environment.

There's nothing wrong with enforcing file permissions programmatically. 

Maybe the program creates a log file that shouldn't be readable by 
anyone. Maybe the program is a code generator that produces other files 
which should be executable (I can't remember anyone doing this, but 
there's no reason why it couldn't be reasonably be done). 

Messing with the general umask isn't polite, but it's okay to manage the 
permissions of files a program governs, if the problem it was written to 
solve has such a requirement.


-- 
Chris Devers

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to