Re: Re: Minimalist permissions

From: Date: Wed, 16 Feb 2005 17:40:01 +0000
Subject: Re: Re: Minimalist permissions
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-208852@lists.php.net to get a copy of this message
On Wed, 2005-02-16 at 10:17, Jason Wong wrote: > On Wednesday 16 February 2005 23:30, Ugo Bellavance wrote: > > > If the needed permissions for standard PHP files and directories > > are 'r' on files and 'r-x' on directories, how can I set my umask so > > that files and directories are always created as such? I looked up > > 'man umask' and it seems to treat files and directories the same way. > > Maybe that is impossible, but I logged in via FTP to a server of a web > > hosting company, and it implements just this: creates directories as > > rwxr-xr-x and files as rw-r--r--. > > chmod() after creating any directory or file. > This is a very good idea. There was a bug in php at one time that allowed a umask setting to be held in the apache process that it was run in so you really could not rely on a umask being set to any specific value. It was reported via redhat: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=121454 Bret

« previous php.general (#208852) next »