Re: safe_mode and file/directory ownership

From: Date: Wed, 02 Jul 2003 05:19:01 +0000
Subject: Re: safe_mode and file/directory ownership
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-153668@lists.php.net to get a copy of this message
Take a look at safe_mode_gid, it tells PHP to do safe mode owner checking using the group id rather than user id. safe_mode_gid boolean By default, Safe Mode does a UID compare check when opening files. If you want to relax this to a GID compare, then turn on safe_mode_gid. Whether to use UID (FALSE) or GID (TRUE) checking upon file access. http://www.php.net/manual/en/features.safe-mode.php Other than that consider turning off safe mode if you have access to it, or turn it off for your virtual host. Jason Paul Chvostek wrote:
I've got a script whose configuration creates a storage directory owned by the web server in which files get stored, also owned by the web server. With safe_mode in effect, I'm getting errors like: Warning: file_exists() [function.file-exists]: SAFE MODE Restriction in effect. The script whose uid is 10054 is not allowed to access /path/to/some/data owned by uid 80 in /path/to/some/file.php on line 111 Wouldn't it make sense for safe_mode also to allow read access to files owned by the web server's process as well as the directory owner's? Obviously, a process running as uid 80 won't be able to suid to another user. If I make the directory owned by the user, the files will be inaccessible, but if I make the directory uid 80, then *it* will be inaccessible. Is there some other solution to storing (and then retrieving) files with safe_mode on? Thanks.


« previous php.general (#153668) next »