Re: Apache not liking directories outside of /var/www

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Fri, Jul 31, 2009 at 12:24 PM, Filipe Brandenburger
<filbranden@xxxxxxxxx> wrote:
>
> Hi,
>
> On Fri, Jul 31, 2009 at 12:17, Boris Epstein<borepstein@xxxxxxxxx> wrote:
> > Any idea why that would be?
>
> It's SELinux. Files exported by Apache must have context
> httpd_sys_content_t. You can use "ls -Z" to see the context of a
> certain file. You can use "chcon -R httpd_sys_content_t /home/test" to
> change the context of all the files in the /home/test directory,
> however that will not apply to new files created under that directory,
> in which case you have to add new rules using "semanage fcontext" (see
> the examples "man semanage" for help on how to do that).
>
> In general I would advise you to try to adapt your application so that
> the files that need to be seen by Apache are under /var/www, if you
> have that flexibility it will be simpler and have less chance of
> breaking in the future.
>
> HTH,
> Filipe
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos

I found an even simplier solution - disabled SELinux. I've got a
firewall and that is plenty.

Thanks a lot, Filipe!
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux