Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


selinux_list_contexts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
selinux_list_contexts [2016/05/15 11:30] – [CentOS 7 - List SELinux contexts] adminselinux_list_contexts [2016/05/15 11:35] – [Example] admin
Line 11: Line 11:
    
 ====Example==== ====Example====
-You want to add a CIFS share and set the correct SELinux context.+You want to add a CIFS share and set the correct SELinux context on the shared directory and below.
   * Find the samba type:<code>seinfo -t |grep samba   * Find the samba type:<code>seinfo -t |grep samba
    samba_secrets_t    samba_secrets_t
Line 29: Line 29:
    samba_etc_t    samba_etc_t
    samba_log_t</code>    samba_log_t</code>
 +  * We probably need ''samba_share_t''
 +  * Check already configured contexts:<code>semanage fcontext -l</code>
 +  * Set the context, if you don't know how, check ''semanage fcontext %%--%%help'' :<code>semanage fcontext -a -t samba_share_t "/opt/smbdata(/.*)?"</code>
        
selinux_list_contexts.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1