Re: Re: Permission denied, although permissions are right
| From: | Wim Godden | Date: | Thu, 13 Dec 2001 11:51:17 +0000 |
| Subject: | Re: Re: Permission denied, although permissions are right | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-77572@lists.php.net to get a copy of this message | ||
So there's no way for me to open that file ? It's generated as zapman and I
can't change that...
Any ideas or tricks to get around the protection without causing a big security
hole ?
Fred wrote:
> 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
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net