Re: mkdir in safe-mode

From: Date: Mon, 05 Aug 2002 20:45:12 +0000
Subject: Re: mkdir in safe-mode
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-111258@lists.php.net to get a copy of this message
I'm also trying to figure this out right now. I have permissions for my directories set to 755, but when I want to create a new directory within PHP, I'm told I don't have permission to do so. This happens even when I use umask('0000') before the mkdir() function. chmod() doesn't work either because I get the same "don't have permission" error. Only way to make it work is to change the permissions for all directories on my web server to 777 which I don't really want to do. So, I'd also like to know if it's possible to have a PHP script make, delete and rename directories without having to set all directories to 777 permissions on the server. > From: jboonstra@gospelcom.net (Joel Boonstra) > Newsgroups: php.general > Date: Mon, 5 Aug 2002 16:17:35 -0400 (EDT) > To: Kai <eisbrenner@gidn.de> > Cc: "php-general@lists.php.net" <php-general@lists.php.net> > Subject: Re: mkdir in safe-mode > > I, too, have noticed this same problem. Correct me if I'm wrong, but > shouldn't PHP running under safe_mode create directories and files to be > owned by the same owner as the currently-running PHP script? If my > webserver runs as user 'apache', but safe_mode is enabled, and a script > owned by user 'joel' creates a directory in my home directory, the > directory is still owned by 'apache', rather than 'joel'. > > This seems to be misbehavior, since, as Kai pointed out, creating files > within that directory won't work, since the safe_mode user ('joel') > doesn't have permissions to create files in a directory owned by user > 'apache', even though joel just created the directory with PHP! > > Any help on how to get around this, or fix it? > > -- > [ joel boonstra | jboonstra@gospelcom.net ] >

« previous php.general (#111258) next »