I'm trying to configure SELinux on my home pc. During installation /etc/selinux/policy file had not been created thus I was not able to configure custom policy with checkpolicy. So I've copied it from an example. Here it is:


Configuration itself seems extremely simple, yet when I try


I get an error

policy.conf:1:ERROR 'syntax error' at token 'SELINUX' on line 1:

How can this be fixed? I feel like the whole idea of adding this file manually is wrong.

selinux version is 0.5.6

uname says:

Linux debian 4.9.0-8-amd64

policy file that is loaded into the kernel is located at


Where <'SELINUXTYPE'> is the policy name specified in the SELinux configuration file /etc/selinux/config and <'version'> is the SELinux policy version.

An example /etc/selinux/config file is shown below where the SELINUXTYPE=targeted entry identifies the policy name that will be used to locate and load the active policy:


From the above example, the actual binary policy file would be located at /etc/selinux/targeted/policy and be called policy.29 (as version 29 is supported by F-20):

  • yep, I have exact same file apart from three lines and it does not work :( Removing these lines does not fix anything – Miyuki ishikawa Apr 22 at 6:40

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.