Permissions/Apache Question

Fernando Duran liberosec-FFYn/CNdgSA at public.gmane.org
Sat Apr 2 00:49:28 UTC 2011



----- Original Message ----
> From: ted leslie <ted.leslie-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>
> To: tlug-lxSQFCZeNF4 at public.gmane.org
> Cc: Stephen <stephen-d-bJEeYj9oJeDQT0dZR+AlfA at public.gmane.org>
> Sent: Fri, April 1, 2011 8:22:24 PM
> Subject: Re: [TLUG]: Permissions/Apache Question
> 
> apache usually runs as "nobody" or "web" or "www" account, don't run
> apache  as "root" and it doesn't sound like you do.
> the file has to be readable (and  perhaps exe) by the owner of the
> apache process.
> do a ps ax and see who  owns your apache. also you can get into a group
> permission set up to that may  work for you.
> also i don't thing you "turned the bits off"?
> chmod  [o|g|u]+rx
> or use the old octal format, but as i look at it, you would have  to
> turn "on" bits, or change owner of the file to be owned by same  owner
> as apache,
> or get into group permissions.


While all this is correct, I think what happened is that Apache throws an error 
when a php file has too many permissions, don't remember which ones (l haven't 
done php in a long time).

OP can check the apache error log for this.

Cheers,
 ---------------------
Fernando Duran
http://www.fduran.com


> 
> tl
> 
> On Fri,  Apr 1, 2011 at 8:09 PM, Stephen <stephen-d-bJEeYj9oJeDQT0dZR+AlfA at public.gmane.org> wrote:
> > I  am creating a new web site, and I ftp'ed the index.php file to the  host.
> >
> > I got a 500 internal server error.
> >
> > It  turns out that the problem was that the permissions on the file had the
> >  execution bits set for owner, group and all.
> >
> > When I turned the  bits off, all was well.
> >
> > Can someone explain why the settings  would matter? Is this a general Linux
> > thing, or strictly an Apache  thing?
> >
> > On my local LAMP I had no issues when  testing.
> >
> > Thanks
> > Stephen
> > --
> > The Toronto  Linux Users Group.      Meetings: http://gtalug.org/
> > TLUG requests: Linux topics, No HTML, wrap text  below 80 columns
> > How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
> >
> --
> The Toronto Linux  Users Group.      Meetings: http://gtalug.org/
> TLUG requests: Linux topics, No HTML,  wrap text below 80 columns
> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
> 
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list