You are here: Re: [PHP] Re: Minimalist permissions « PHP « IT news, forums, messages
Re: [PHP] Re: Minimalist permissions

Posted by Bret Hughes on 10/02/01 11:08

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация