I solved this about 15 minutes after I posted, so I'll share. I honestly didn't understand SELinux fundamentals, so I didn't know about contexts etc. Of course, since I pulled the files into my home directory via rsync, they were way off.
Running ls -z produced:
Code: Select all
-rw-r--r--. root root unconfined_u:object_r:user_home_t:s0 httpd.conf
Since I still hadn't written over /etc/httpd/conf/magic I was able to see what it should be set as. To get the file back to the right SELinux settings I ran:
Code: Select all
semanage fcontext -a -t httpd_config_t -s system_u httpd.conf
restorecon -vF httpd.conf
Which then get's me back to the right user and context:
Code: Select all
-rw-r--r--. root root system_u:object_r:httpd_config_t:s0 httpd.conf
I turned back on SELinux with:
And finally tested the changes with
So things are working. Sorry, but hopefully it helps document SELinux features for others. I'm actually kind of excited about the features now that I get it.