Re: SELinux - different context on subdirectories

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Marcus Moeller wrote:
> Hi all,
> 
> I have created a directory /srv with the following SELinux context:
> 
> system_u:object_r:var_t
> 
> 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:
> 
> system_u:object_r:var_t
> 
> What am I missing?
> 

Hi Marcus,

Try the following:

semanage fcontext -a -t samba_share_t "/srv/samba(/.*)?"


Ned

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux