Re: Permission denied, although permissions are right

From: Date: Wed, 12 Dec 2001 20:36:23 +0000
Subject: Re: Permission denied, although permissions are right
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-77482@lists.php.net to get a copy of this message
Your PHP script may be owned by zapman, but it is run as nobody. Therefore your file that you need to access also needs to be owned by nobody. Fred Wim Godden <wim@godden.net> wrote in message news:3C1754FE.F4B3E2D1@godden.net... > Hi, > > I'm trying to open a file (using fopen) in the /tmp directory which is > owned by user 'zapman'. The php script is also owned by user 'zapman'. > However, when I try to run it, I get : > Warning: fopen("/tmp/1.dat","r") - Permission denied in > /documents/zapman/html/openfile.php on line 5 > > If I do a ps auwx | grep http, I get : > root 20341 0.0 0.0 15100 56 ? S 12:46 0:02 > /usr/local/apache/bin/httpd -DSSL > nobody 20342 0.6 3.3 18276 4184 ? S 12:46 0:26 > /usr/local/apache/bin/httpd -DSSL > nobody 20343 0.8 4.6 20008 5936 ? S 12:46 0:35 > /usr/local/apache/bin/httpd -DSSL > nobody 20344 0.3 3.2 16100 4108 ? S 12:46 0:15 > /usr/local/apache/bin/httpd -DSSL > > So the main process is running as root, the rest is running as nobody... > that's the way to do it, right ? Or should I run Apache as root (which I > don't like at all !) ? > > Greetings, > > Wim Godden >

« previous php.general (#77482) next »