Repair SELinux File Contexts
The ops portal returns 403 on a server where the permissions are right and the web server is healthy. SELinux is doing its job on the wrong labels. Fix the labels, keep it enforcing.
Skill labintermediate~30 minPro
What you'll do
- ✓Read an AVC denial and say which process was refused what on which file
- ✓Tell a Unix permission problem from an SELinux label problem
- ✓Add a persistent file-context rule and apply it with restorecon
- ✓Prove the repair survives a relabel and a service restart with SELinux still enforcing
Lab outline
- 01Read the evidence
- 02Fix the labels
- 03Make sure it stays fixed
Before you start
- Comfortable with Unix ownership and modes
- Have started and stopped a systemd service before
Every lab runs on a real machine of your own in the browser — no installs, nothing to clean up — and checks your work automatically as you go.