[Solved] Selinux - my arch enemy - contexts
Posted: 2020/07/15 17:06:10
Selinux absolutely eludes me. I know what it does and why. Any grip on the management of it is lost on me, with the exception of setenforce that I have to use for a couple of my apps ... regularly.
I have a shared directory on a data drive on my server upstairs that contains a couple databases - to which I cannot save LibreOffice edits unless I turn off enforcement for the save duration. Poking around a few minutes ago, I now know why:
I suspect the http context was the result of an embarrassing "incident" a number of years ago that I caught about 10 seconds after I issued the command that seemed to be taking a long time. Can someone tell me to what context I should set this folder so that family users may edit and that will survive 'restorecon'?
A "sub-question": Is there any EASY way to find out contexts and what they actually DO so that next time I might figure it out myself?
Grateful for the help, thank you.
I have a shared directory on a data drive on my server upstairs that contains a couple databases - to which I cannot save LibreOffice edits unless I turn off enforcement for the save duration. Poking around a few minutes ago, I now know why:
Code: Select all
$ ls -laZ
drwsrwsr-x. egor family unconfined_u:object_r:httpd_sys_content_t:s0 .
drwxrwxr-x. egor family unconfined_u:object_r:httpd_sys_content_t:s0 ..
-rw-rw-r--. egor family system_u:object_r:httpd_sys_content_t:s0 16portswitch_crawlspace.odb
-rwxrwxr--. egor family system_u:object_r:httpd_sys_content_t:s0 Access_CLA.odb
-rwxrwxr--. egor family unconfined_u:object_r:httpd_sys_content_t:s0 Access.odb
A "sub-question": Is there any EASY way to find out contexts and what they actually DO so that next time I might figure it out myself?
Grateful for the help, thank you.