Difference between revisions of "Home directory stuff"

From MyWiki
Jump to: navigation, search
(Created page with "<source lang="text"> #This sets /home2’s labels to be same as /home semanage fcontext -a -e /home /home2 #This updates the labels of /home2, with the –R option doing it...")
 
(No difference)

Latest revision as of 12:25, 18 August 2016

#This sets /home2’s labels to be same as /home
 
semanage fcontext -a -e /home /home2
 
#This updates the labels of /home2, with the –R option doing it recursively for existing subdirectories.
 
restorecon –R /home2
 
Afterwards, existing and newly created user home directories will be labeled correctly.  If you’re interested in seeing how semanage correctly labels contents of home directories, check out /etc/selinux/targeted/modules/active/homedir_template.