Re: Re: mkdir in safe-mode
| From: | Monty | Date: | Mon, 05 Aug 2002 22:35:18 +0000 |
| Subject: | Re: Re: mkdir in safe-mode | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-111267@lists.php.net to get a copy of this message | ||
So, it appears that unless you set all your directories in your HTTP folders
to 777 permissions, there's just no way to make a PHP script create or
remove directories, is that right?
If there is a way, could someone please share how it's done? I've been
searching online for hours for a solution and can't find anything. Maybe
because PHP can't do this unless you make the server a little less secure?
Thanks.
> From: phplist@newmediaone.com (Peter Janett)
> Organization: New Media One Web Services, LLC
> Reply-To: "Peter Janett" <phplist@newmediaone.com>
> Newsgroups: php.general
> Date: Mon, 5 Aug 2002 15:46:53 -0600
> To: "Joel Boonstra" <jboonstra@gospelcom.net>
> Cc: <php-general@lists.php.net>
> Subject: Re: [PHP] Re: mkdir in safe-mode
>
> Here's my understanding based on experience, which is only that, so don't
> take this a proven fact or anything. :)
>
> Lets assume Apache is running as user Apache. You are user websiteowner.
> When you FTP into the server and create a directory, that directory is owned
> by user websiteowner. User Apache can read that directory (or really files
> in that directory), as user Apache has read only access to those files, but
> it can't write those files, because Apache does not have write access. (I'm
> skipping execute permissions for now).
>
> IN other words, PHP runs as user Apache, and you ask it to create a
> directory in a folder owned by websiteowner. Since Apache doesn't have
> write access, it can't create that directory (it lacks write access.)
>