CmdID

CmdID / Commands

semanage-fcontext

Manage persistent SELinux security context rules on files/directories. tldr-pages

On Linux

Opens CmdID with your command. It is read in your browser and sent nowhere.

List all file labeling rules

sudo semanage fcontext --listIdentify

List all user-defined file labeling rules without headings

sudo semanage fcontext --list --locallist --noheadingIdentify

Add a user-defined rule that labels any path which matches a PCRE regex

sudo semanage fcontext --add --type samba_share_t '/mnt/share(/.*)?'Identify

Add a user-defined rule that creates a labeling equivalence between two subpaths

sudo semanage fcontext --add --equal /path/to/ref /path/to/targetIdentify

Delete a user-defined rule using its PCRE regex

sudo semanage fcontext --delete '/mnt/share(/.*)?'Identify

Relabel a directory recursively by applying the new rules

restorecon -Rv path/to/directoryIdentify
-RRecurse into directories toybox
-vVerbose toybox