Re: mkdir in safe-mode

From: Date: Mon, 05 Aug 2002 20:17:35 +0000
Subject: Re: mkdir in safe-mode
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-111253@lists.php.net to get a copy of this message
> sorry, my english isn't the best. > > I have a problem to dynamically create directorystructures using > php 4.2.2 running as modul in safe-mode. > > the ftp- and apache user (for the virtual-hosts) are identical, but the > user, the apache-daemon > in runnung under, is a different, so that directory-access ist only > possible to the owner. > > if now using the mkdir-function, php creates a directory owned by the > user, the apache-daemon is > started with, not by the user, the virtual-host is running under. > > the first directory can be created, if the permissions are the to. but > in the created directory i > can't create other directories or files. 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 (#111253) next »