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 <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > 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 > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]