[CentOS] SELinux - different context on subdirectories
ned at unixmail.co.uk
Thu Mar 19 15:35:23 UTC 2009
Marcus Moeller wrote:
> Hi all,
> I have created a directory /srv with the following SELinux context:
> Now I want to create a subdirectory within /srv which should get a
> different context. So I tried to set e.g.:
> semanage fcontext -a -t samba_share_t /srv/samba
> /sbin/restorecon -v /srv/samba
> but the context is always reset to:
> What am I missing?
Try the following:
semanage fcontext -a -t samba_share_t "/srv/samba(/.*)?"
More information about the CentOS