January 2018
Intermediate to advanced
376 pages
8h 45m
English
Using restorecon is easy. Just type restorecon, followed by the name of the file that you need to change. Once again, I've changed the context of the index.html file back to the home directory type. This time though, I'm using restorecon to set the correct type:
[donnie@localhost html]$ ls -Z-rw-rw-r--. donnie donnie unconfined_u:object_r:user_home_t:s0 index.html[donnie@localhost html]$ sudo restorecon index.html[donnie@localhost html]$ ls -Z-rw-rw-r--. donnie donnie unconfined_u:object_r:httpd_sys_content_t:s0 index.html[donnie@localhost html]$
And, that's all there is to it.