In /etc/selinux/targeted/contexts/files/file_contexts, some lines will have just two parts, with the context as the second part, but some will have three parts where the second part is --, -d, etc. What do these mean? I've looked through the documentation I can find but as far as I can tell none of them mention it.


The -d means to match only directories, the -- means to match only files.

Original link to documentation - Understanding the File Contexts Files.

  • Ah, so -l means only symbolic links, -b means only block devices and -c means only character devices. Got it. – Matthew Cline Mar 26 '18 at 9:57

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.