Chris Devers wrote:
> 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. 

Anyone? Maybe you mean owner only? Fine, use creation bits of 0600.

> 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).

Fine, use creation bits of 0777.

Neither of these require fooling with umask.

My gripe is with a program that decides a file _needs_ to be created as 666,
for example.

> 
> 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.

-- 
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