Problem with apache accessing files outside of /var/www/html directory

Daniel J Walsh dwalsh at redhat.com
Tue Feb 19 16:47:09 UTC 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Bartmess wrote:
> I'm trying to get apache to serve up via a CGI script the formatted contents
> of a directory outside of the DocumentRoot directory structure, and SELinux
> is giving me a "Permissions Denied" error.
> 
>  
> 
> How can I modify the SELinux context on the files being shown to fix this?
> 
>  
> 
> The current files/dirs have the following context:
> 
>  
> 
> drwxr-xr-x  apache   apache   system_u:object_r:default_t      v1x3x3_R3-6
> 
> drwxr-xr-x  apache   apache   system_u:object_r:default_t      v1x3x4-R1-0
> 
> drwxr-xr-x  apache   apache   system_u:object_r:default_t      v1x3x4-R2-0
> 
> -rwxr-xr-x  apache   apache   system_u:object_r:default_t
> ASUCTests_v1-2-3_b1x3x4.R2_JUnitReport.zip
> 
> -rwxr-xr-x  apache   apache   system_u:object_r:default_t
> Emma_Acquisition_Configuration_v2-3-0.zip
> 
>  
> 
> I'm a newbie at this SELinux stuff, so please speak clearly <grin>
> 
>  
> 
> David Bartmess. Configuration Manager
> 
> Cell:   +1 (303) 883-9117
> 
> Office:+1 (303) 256-5123
> 
>  
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> --
> fedora-selinux-list mailing list
> fedora-selinux-list at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-selinux-list
# semanage fcontext -a -t httpd_sys_content_t '/TOPDIR(/.*)?'
# restorecon -R -v /TOPDIR
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAke7CAwACgkQrlYvE4MpobN4ugCg3fM0avkmNxnXx+I27h/2dFpY
ZfAAnRqhxF3TYh161FVH85t23dOUGEA0
=ftfn
-----END PGP SIGNATURE-----




More information about the fedora-selinux-list mailing list