1

I am trying to export a Samba share and changing its SELinux fcontext to 'samba_share_t'. However in the guide that I follow after changing the fcontext, I need to run 'restorecon' over the exported samba directory. Looking at the manpage for it => "restore file(s) default SELinux security contexts", I am just wondering is not that going to revert back the directory to a state where fcontext does not have the 'samba_share_t' value?

0

Yes. If you modified the context to something different than is in the installed policy, it will set the context according to the policy.

| improve this answer | |
0

According to Red Hat documentation (Persistent Changes: semanage fcontext), if you want these to persist you'd use semanage, then a restorecon will use what you want instead of the policy's context.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.