Re:SELinux is unmanageable; just turn it off if it gets in y...
by dale_glass on Wednesday April 27, 2022 @06:40AM
(#31178349)
Fedora comes with manpages. So for instance, say you want to place http pages outside of /var/www. Fedora comes with the selinux-policy-doc package, which gives you the httpd_selinux manpage:
It's a tad dense, but in the Sharing Files you can find a section explaining what context is used and for what. You can also look at the existing context, eg:
$ ls -laZ /var/www
total 4
drwxr-xr-x. 4 root root system_u:object_r:httpd_sys_content_t:s0 33 mar 17 17:32 .
drwxr-xr-x. 21 root root system_u:object_r:var_t:s0 4096 abr 18 10:57 ..
drwxr-xr-x. 2 root root system_u:object_r:httpd_sys_script_exec_t:s0 6 mar 17 17:32 cgi-bin
drwxr-xr-x. 2 root root system_u:object_r:httpd_sys_content_t:s0 6 mar 17 17:32 html
https://linux.die.net/man/8/httpd_selinux
It's a tad dense, but in the Sharing Files you can find a section explaining what context is used and for what. You can also look at the existing context, eg:
And copy those for your own use.