SELinux is not allowing me to change the context of a symlink. I get no errors or anything. It just doesn't change the symlink, which I am guessing means it is resolving the symlink and changing that instead? coderoot is a symlink:

chcon -t httpd_sys_content_t /var/coderoot

This leaves the context of the symlink the same. When my application references the symlink SELinux jumps in and says no. With SElinux off it works fine. How can I fix this?


From the chcon(1) man page:

   -h, --no-dereference
          affect symbolic links instead of any referenced file

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.