Apache, SELinux, and document root on a different partition
shiva at sewingwitch.com
Sun Nov 30 13:56:56 UTC 2008
I want to put the document root for an application on a separate paritition
that has more space. When I try to configure this I can't access the files
in the new location. I've got the SELinux attributes set on the directory
and its files, so I'm thinking it's something about the parent path that
SELinux doesn't like, but I don't know where that's handled.
My partition is mounted to /mnt/bigdisk2, and I put the app in the wbb3tmp
[root at centos wbb3-tmp]# ls -Za
drwxr-xr-x apache apache system_u:object_r:httpd_sys_content_t .
drwxr-xr-x root root system_u:object_r:file_t ..
-rw-r--r-- apache apache system_u:object_r:httpd_sys_content_t
-rw-r--r-- apache apache system_u:object_r:httpd_sys_content_t index.html
-rw-r--r-- apache apache system_u:object_r:httpd_sys_content_t install.php
-rw-r--r-- apache apache system_u:object_r:httpd_sys_content_t test.php
[root at centos wbb3-tmp]# pwd
My Apache VirtualHost block contains this:
Alias /wbb3-tmp /mnt/bigdisk2/wbb3-tmp
AllowOverride AuthConfig Options Limit
Options +Indexes -ExecCGI +FollowSymLinks +MultiViews
Allow from all
This works if I disable SELinux.
More information about the CentOS