Recent Notes
Displaying keyword search results 1 - 2
Created by voodoo on April 14, 2011 13:16:18
Last update: April 14, 2011 13:17:48
From Fedora Project wiki : A security context , or security label , is the mechanism used by SELinux to classify resources, such as processes and files, on a SELinux-enabled system. This context allows SELinux to enforce rules for how and by whom a given resource should be accessed. A security context is typically shown as a string consisting of three or four words. Each word specifies a different component of the security context, namely, the user , role , type , and level of that file or process . Each word is separated by a colon. Use the -Z switch to display security context info. Display security context for Apache files:
$ ls -Z /var/www/ drwxr-xr-x. root root system_... Display security for files under...
Created by voodoo on April 13, 2011 13:47:34
Last update: April 13, 2011 13:49:20
You get "permission denied" error from Apache HTTPD for a page. And you checked file/directory permissions (the whole directory path, not just the file) and everything in httpd.conf . If everything seemed right, then SELinux may be blocking the access.
Open /var/log/httpd/error_log , you may see a line like this:
[Wed Apr 13 15:50:35 2011] [notice] SELinux poli...
These are the steps to fix:
If the directory resides in a user home directory:
# setsebool -P httpd_read_user_content 1
Create a policy package from the audit log:
# grep httpd /var/log/audit/audit.log | audit2allo...
Apply the policy package just created
# semodule -i mypol.pp
Restart apache httpd:
# apachectl restart