1. httpd SELinux context
chcon -v --type=httpd_sys_content_t /path/to/dir
2.httpd SELinux context
chcon -Rv --type=httpd_sys_content_t /path/to/dir
3. Restore old/default context
restorecon -Rv -n /var/www/html
; -n switch to prevent any relabelling occurring.
4. Changing default port for services permitted SELinux
# semanage port -l
# semanage port -a -t http_port_t -p tcp 81
5. For Nagios
1st command to see what are the supported services. 2nd one changing default port for http service.
Note: Give me time to write them with proper explanation.
More: http://wiki.centos.org/TipsAndTricks/SelinuxBooleans
chcon -v --type=httpd_sys_content_t /path/to/dir
2.httpd SELinux context
chcon -Rv --type=httpd_sys_content_t /path/to/dir
3. Restore old/default context
restorecon -Rv -n /var/www/html
; -n switch to prevent any relabelling occurring.
4. Changing default port for services permitted SELinux
# semanage port -l
# semanage port -a -t http_port_t -p tcp 81
5. For Nagios
chcon -R -t httpd_sys_content_t /usr/local/nagios
1st command to see what are the supported services. 2nd one changing default port for http service.
Note: Give me time to write them with proper explanation.
More: http://wiki.centos.org/TipsAndTricks/SelinuxBooleans
0 Comments