restorecon isn't restoring what matchpathcon shows
Paul Howarth
paul at city-fan.org
Fri Nov 21 14:20:49 UTC 2008
Chuck Anderson wrote:
> There are a bunch of files and directories in my F10 home dirs that
> have type unconfined_u:object_r:user_home_t, but matchpathcon says
> they are supposed to be system_u:object_r:user_home_t. I tried to run
> restorecon but it isn't changing the type:
>
> [root at l 9:06:49 /home/install]#matchpathcon /home/install/Templates
> /home/install/Templates system_u:object_r:user_home_t:s0
> [root at l 9:06:51 /home/install]#ls -lZd Templates
> drwxr-xr-x install install unconfined_u:object_r:user_home_t:s0
> Templates/
> [root at l 9:06:56 /home/install]#restorecon -R Templates
> [root at l 9:07:07 /home/install]#ls -lZd Templates
> drwxr-xr-x install install unconfined_u:object_r:user_home_t:s0
> Templates/
>
> [root at l 9:07:10 /home/install]#su - install
> [install at l ~]$ restorecon -R .
> [install at l ~]$ restorecon -R Templates/
> [install at l ~]$ logout
> [root at l 9:08:23 /home/install]#ls -lZd Templates
> drwxr-xr-x install install unconfined_u:object_r:user_home_t:s0
> Templates/
>
> Why does this happen?
restorecon doesn't change the user part of a context unless you use -F.
Paul.
More information about the fedora-selinux-list
mailing list