8

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?

Joshua Enfield
  • 3,404
  • 8
  • 41
  • 58

1 Answers1

14

From the chcon(1) man page:

   -h, --no-dereference
          affect symbolic links instead of any referenced file
Ignacio Vazquez-Abrams
  • 45,019
  • 5
  • 78
  • 84