1sftpd_selinux(8) SELinux Policy sftpd sftpd_selinux(8)
2
3
4
6 sftpd_selinux - Security Enhanced Linux Policy for the sftpd processes
7
9 Security-Enhanced Linux secures the sftpd processes via flexible manda‐
10 tory access control.
11
12 The sftpd processes execute with the sftpd_t SELinux type. You can
13 check if you have these processes running by executing the ps command
14 with the -Z qualifier.
15
16 For example:
17
18 ps -eZ | grep sftpd_t
19
20
21
23 SELinux defines process types (domains) for each process running on the
24 system
25
26 You can see the context of a process using the -Z option to ps
27
28 Policy governs the access confined processes have to files. SELinux
29 sftpd policy is very flexible allowing users to setup their sftpd pro‐
30 cesses in as secure a method as possible.
31
32 The following process types are defined for sftpd:
33
34 sftpd_t
35
36 Note: semanage permissive -a sftpd_t can be used to make the process
37 type sftpd_t permissive. SELinux does not deny access to permissive
38 process types, but the AVC (SELinux denials) messages are still gener‐
39 ated.
40
41
43 SELinux policy is customizable based on least access required. sftpd
44 policy is extremely flexible and has several booleans that allow you to
45 manipulate the policy and run sftpd with the tightest access possible.
46
47
48
49 If you want to deny any process from ptracing or debugging any other
50 processes, you must turn on the deny_ptrace boolean. Enabled by
51 default.
52
53 setsebool -P deny_ptrace 1
54
55
56
57 If you want to allow any process to mmap any file on system with
58 attribute file_type, you must turn on the domain_can_mmap_files bool‐
59 ean. Enabled by default.
60
61 setsebool -P domain_can_mmap_files 1
62
63
64
65 If you want to allow all domains write to kmsg_device, while kernel is
66 executed with systemd.log_target=kmsg parameter, you must turn on the
67 domain_can_write_kmsg boolean. Disabled by default.
68
69 setsebool -P domain_can_write_kmsg 1
70
71
72
73 If you want to allow all domains to use other domains file descriptors,
74 you must turn on the domain_fd_use boolean. Enabled by default.
75
76 setsebool -P domain_fd_use 1
77
78
79
80 If you want to allow all domains to have the kernel load modules, you
81 must turn on the domain_kernel_load_modules boolean. Disabled by
82 default.
83
84 setsebool -P domain_kernel_load_modules 1
85
86
87
88 If you want to allow all domains to execute in fips_mode, you must turn
89 on the fips_mode boolean. Enabled by default.
90
91 setsebool -P fips_mode 1
92
93
94
95 If you want to enable reading of urandom for all domains, you must turn
96 on the global_ssp boolean. Disabled by default.
97
98 setsebool -P global_ssp 1
99
100
101
102 If you want to support ecryptfs home directories, you must turn on the
103 use_ecryptfs_home_dirs boolean. Disabled by default.
104
105 setsebool -P use_ecryptfs_home_dirs 1
106
107
108
109 If you want to support fusefs home directories, you must turn on the
110 use_fusefs_home_dirs boolean. Disabled by default.
111
112 setsebool -P use_fusefs_home_dirs 1
113
114
115
116 If you want to support NFS home directories, you must turn on the
117 use_nfs_home_dirs boolean. Disabled by default.
118
119 setsebool -P use_nfs_home_dirs 1
120
121
122
123 If you want to support SAMBA home directories, you must turn on the
124 use_samba_home_dirs boolean. Disabled by default.
125
126 setsebool -P use_samba_home_dirs 1
127
128
129
131 The SELinux process type sftpd_t can manage files labeled with the fol‐
132 lowing file types. The paths listed are the default paths for these
133 file types. Note the processes UID still need to have DAC permissions.
134
135 user_home_t
136
137 /home/[^/]+/.+
138
139 user_tmp_t
140
141 /dev/shm/mono.*
142 /var/run/user(/.*)?
143 /tmp/.X11-unix(/.*)?
144 /tmp/.ICE-unix(/.*)?
145 /dev/shm/pulse-shm.*
146 /tmp/.X0-lock
147 /tmp/hsperfdata_root
148 /var/tmp/hsperfdata_root
149 /home/[^/]+/tmp
150 /home/[^/]+/.tmp
151 /tmp/gconfd-[^/]+
152
153
155 semanage fcontext can also be used to manipulate default file context
156 mappings.
157
158 semanage permissive can also be used to manipulate whether or not a
159 process type is permissive.
160
161 semanage module can also be used to enable/disable/install/remove pol‐
162 icy modules.
163
164 semanage boolean can also be used to manipulate the booleans
165
166
167 system-config-selinux is a GUI tool available to customize SELinux pol‐
168 icy settings.
169
170
172 This manual page was auto-generated using sepolicy manpage .
173
174
176 selinux(8), sftpd(8), semanage(8), restorecon(8), chcon(1), sepolicy(8)
177 , setsebool(8)
178
179
180
181sftpd 19-04-25 sftpd_selinux(8)