CmdID

CmdID / Commands

chcon

Change the SELinux security context of listed file[s]. toybox

On Linux

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

Linux

from the toybox, 0BSD
chcon [-hRv] CONTEXT FILE...
-hChange symlinks instead of what they point to
-RRecurse into subdirectories
-vVerbose

Change SELinux security context of a file or files/directories.

View security context of a file

ls -l --context path/to/fileIdentify
-llong (show full details) toybox

Change the security context of a target file, using a reference file

chcon --reference reference_file target_fileIdentify

Change the full SELinux security context of a file

chcon user:role:type:range/level filenameIdentify

Change only the user part of SELinux security context

chcon --user user filenameIdentify

Change only the role part of SELinux security context

chcon --role role filenameIdentify

Change only the type part of SELinux security context

chcon --type type filenameIdentify

Change only the range/level part of SELinux security context

chcon --range range/level filenameIdentify