1samba_selinux(8)      Samba Selinux Policy documentation      samba_selinux(8)
2
3
4

NAME

6       samba_selinux - Security Enhanced Linux Policy for Samba
7

DESCRIPTION

9       Security-Enhanced Linux secures the Samba server via flexible mandatory
10       access control.
11

FILE_CONTEXTS

13       SELinux requires files to have an extended attribute to define the file
14       type.   Policy  governs the access daemons have to these files.  If you
15       want to share files other than home directories, those  files  must  be
16       labeled samba_share_t.  So if you created a special directory /var/eng,
17       you would need to label the directory with the chcon tool.
18
19       chcon -t samba_share_t /var/eng
20
21       To make this change permanent (survive a  relabel),  use  the  semanage
22       command to add the change to file context configuration:
23
24       semanage fcontext -a -t samba_share_t "/var/eng(/.*)?"
25
26       This  command  adds the following entry to /etc/selinux/POLICYTYPE/con‐
27       texts/files/file_contexts.local:
28
29       /var/eng(/.*)? system_u:object_r:samba_share_t:s0
30
31       Run the restorecon command to apply the changes:
32
33       restorecon -R -v /var/eng/
34
35

SHARING FILES

37       If you want to share files with multiple domains (Apache,  FTP,  rsync,
38       Samba),  you can set a file context of public_content_t and public_con‐
39       tent_rw_t.  These context allow any of the above domains  to  read  the
40       content.   If  you want a particular domain to write to the public_con‐
41       tent_rw_t   domain,   you   must   set   the    appropriate    boolean.
42       allow_DOMAIN_anon_write.  So for samba you would execute:
43
44       setsebool -P allow_smbd_anon_write=1
45
46

BOOLEANS

48       SELinux  policy  is customizable based on least access required.  So by
49       default SElinux policy turns off SELinux sharing  of  home  directories
50       and the use of Samba shares from a remote machine as a home directory.
51
52       If  you are setting up this machine as a Samba server and wish to share
53       the home directories, you need to set the samba_enable_home_dirs  bool‐
54       ean.
55
56              setsebool -P samba_enable_home_dirs 1
57
58       If  you  want  to use a remote Samba server for the home directories on
59       this machine, you must set the use_samba_home_dirs boolean.
60
61              setsebool -P use_samba_home_dirs 1
62
63       system-config-selinux is a GUI tool available to customize SELinux pol‐
64       icy settings.
65
66

AUTHOR

68       This manual page was written by Dan Walsh <dwalsh@redhat.com>.
69
70

SEE ALSO

72       selinux(8), samba(7), chcon(1), setsebool(8), semanage(8)
73
74
75
76dwalsh@redhat.com                 17 Jan 2005                 samba_selinux(8)
Impressum