Re: mkdir problem
| From: | John McKown | Date: | Thu, 14 Sep 2000 20:35:29 +0000 |
| Subject: | Re: mkdir problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-16831@lists.php.net to get a copy of this message | ||
On Thu, 14 Sep 2000, Nick Allan wrote:
> Hi all
> I posted a message yesterday regarding mkdir giving a permission denied
> error message when trying to create a directory in my web space.
> I only received one message from someone who also had the problem.
> I need to be able to mkdir using php rather than doing it manually through
> ftp.
> Has anyone got any ideas on why php isn't letting me create a directory.
> I'm using the following
> mkdir("/home/site/web/temp", 0700);
> php returns a false and a permission denied error message.
> the server is using php 4.0.1.pl2 as an apache module on a linux server.
>
> I'd appreciate any suggestions anyone can give me to fix this problem.
>
> oh, I'm having the same problem on two other linux redhat based systems
> also.
Well, from what I can tell, PHP runs with the authority of (1) the web
server (usually "nobody") or (2) the last authenicated user. So I wonder,
"Who owns the /home/site/web directory?", I think that for the
mkdir() function to work, you must force the web user to "logon" using
as this user. Or set the permissions to 777 (yuck!)