You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by John Wyatt <jb...@yahoo.com> on 2007/08/24 03:49:33 UTC

[users@httpd] Apache Permmisions error

Hey folks, i'm coding a php blog from a IBM's developerWorks tutorial and I get this error with permissions.

Main blog page

 
 Warning:  mkdir() [function.mkdir]: Permission denied in /home/www/edit/index.php on line 9
 
 Warning:  fopen(../blogs/Aug 2007/Aug 23 2007 18 13) [function.fopen]: failed to open stream: No such file or directory in /home/www/edit/index.php on line 11
 
 Warning:  fwrite(): supplied argument is not a valid stream resource in /home/www/edit/index.php on line 12
 
 Warning:  fclose(): supplied argument is not a valid stream resource in /home/www/edit/index.php on line 13
 Blog entry saved/updated


I'm using php mod and i'm a newbie to both php & apache, I was wondering if someone could help me with this since I haven't  found an answer in the documentation.


John
       
---------------------------------
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. 

Re: [users@httpd] Apache Permmisions error

Posted by Jeff Peng <je...@gmx.net>.
-------- Original-Nachricht --------
> Datum: Thu, 23 Aug 2007 18:49:33 -0700 (PDT)
> Von: John Wyatt <jb...@yahoo.com>
> An: users@httpd.apache.org
> Betreff: [users@httpd] Apache Permmisions error

> Hey folks, i'm coding a php blog from a IBM's developerWorks tutorial and
> I get this error with permissions.
> 
> Main blog page
> 
>  
>  Warning:  mkdir() [function.mkdir]: Permission denied in
> /home/www/edit/index.php on line 9
>  
>  Warning:  fopen(../blogs/Aug 2007/Aug 23 2007 18 13) [function.fopen]:
> failed to open stream: No such file or directory in /home/www/edit/index.php
> on line 11
>  
>  Warning:  fwrite(): supplied argument is not a valid stream resource in
> /home/www/edit/index.php on line 12
>  
>  Warning:  fclose(): supplied argument is not a valid stream resource in
> /home/www/edit/index.php on line 13
>  Blog entry saved/updated
> 
> 

This is most likely because PHP doesn't have the privileges to read/write special directory or files.By default apache/php are running as nobody user,so at first you take a look at that php program to find out which directory/file it try to access,then set the correct privileges to that directory/file.

Under unix,you can use 'chmod' or 'chown' to ajust the privileges on dir/files.

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache Permmisions error

Posted by Vincent Bray <no...@gmail.com>.
On 24/08/07, John Wyatt <jb...@yahoo.com> wrote:
> Hey folks, i'm coding a php blog from a IBM's developerWorks tutorial and I
> get this error with permissions.

It's clearly not a very useful tutorial if it teaches you to ignore
error conditions. Your code should have died at fopen() and never
reached fwrite() or fclose().

But as Jeff pointed out, this looks like a straight up permissions
error. Try reading 'man chmod', or an introductory book on UNIX.

-- 
noodl

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org