Incorrect SELinux Context (Fedora)
Posted: 16 Jul 2017, 20:33
Hello all,
I tried Fedora for the first time today, and CSF failed to install correctly (I've been successful with Centos for quite some time).
Basically the systemd unit files, and the binaries get placed with incorrect SELinux context. I fixed the contexts in /usr/lib/systemd/system/ before I could copy them, but in /usr/sbin they were erroneously:
"unconfined_u:object_r:user_home_t:s0"
The incorrect contexts in the systemd directory caused the CSF and LFD services to not be recognized. The incorrect contexts in /usr/sbin caused the services to fail to start.
Once I fixed the contexts with chcon in both the systemd unit and bin directories, the CSF and LFD services began to start and function normally.
Uname --all = Linux myhostname 4.11.9-300.fc26.x86_64 #1 SMP Wed Jul 5 16:21:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
And my operating system is: Fedora release 26 (Twenty Six)
One thing to point out is that I did not run install.sh as root. I simply used sudo while in the home directory of regular user. Although I feel this shouldn't matter, and it's worked before under Centos.
I tried Fedora for the first time today, and CSF failed to install correctly (I've been successful with Centos for quite some time).
Basically the systemd unit files, and the binaries get placed with incorrect SELinux context. I fixed the contexts in /usr/lib/systemd/system/ before I could copy them, but in /usr/sbin they were erroneously:
"unconfined_u:object_r:user_home_t:s0"
The incorrect contexts in the systemd directory caused the CSF and LFD services to not be recognized. The incorrect contexts in /usr/sbin caused the services to fail to start.
Once I fixed the contexts with chcon in both the systemd unit and bin directories, the CSF and LFD services began to start and function normally.
Uname --all = Linux myhostname 4.11.9-300.fc26.x86_64 #1 SMP Wed Jul 5 16:21:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
And my operating system is: Fedora release 26 (Twenty Six)
One thing to point out is that I did not run install.sh as root. I simply used sudo while in the home directory of regular user. Although I feel this shouldn't matter, and it's worked before under Centos.