]>
Commit | Line | Data |
---|---|---|
dd1eb43b LP |
1 | <?xml version='1.0'?> <!--*-nxml-*--> |
2 | <?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?> | |
3 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" | |
4 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> | |
5 | ||
6 | <!-- | |
7 | This file is part of systemd. | |
8 | ||
9 | Copyright 2010 Lennart Poettering | |
10 | ||
11 | systemd is free software; you can redistribute it and/or modify it | |
5430f7f2 LP |
12 | under the terms of the GNU Lesser General Public License as published by |
13 | the Free Software Foundation; either version 2.1 of the License, or | |
dd1eb43b LP |
14 | (at your option) any later version. |
15 | ||
16 | systemd is distributed in the hope that it will be useful, but | |
17 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
5430f7f2 | 19 | Lesser General Public License for more details. |
dd1eb43b | 20 | |
5430f7f2 | 21 | You should have received a copy of the GNU Lesser General Public License |
dd1eb43b LP |
22 | along with systemd; If not, see <http://www.gnu.org/licenses/>. |
23 | --> | |
24 | ||
25 | <refentry id="systemd.exec"> | |
26 | <refentryinfo> | |
27 | <title>systemd.exec</title> | |
28 | <productname>systemd</productname> | |
29 | ||
30 | <authorgroup> | |
31 | <author> | |
32 | <contrib>Developer</contrib> | |
33 | <firstname>Lennart</firstname> | |
34 | <surname>Poettering</surname> | |
35 | <email>lennart@poettering.net</email> | |
36 | </author> | |
37 | </authorgroup> | |
38 | </refentryinfo> | |
39 | ||
40 | <refmeta> | |
41 | <refentrytitle>systemd.exec</refentrytitle> | |
42 | <manvolnum>5</manvolnum> | |
43 | </refmeta> | |
44 | ||
45 | <refnamediv> | |
46 | <refname>systemd.exec</refname> | |
34511ca7 | 47 | <refpurpose>Execution environment configuration</refpurpose> |
dd1eb43b LP |
48 | </refnamediv> |
49 | ||
50 | <refsynopsisdiv> | |
51 | <para><filename>systemd.service</filename>, | |
52 | <filename>systemd.socket</filename>, | |
2292707d LP |
53 | <filename>systemd.mount</filename>, |
54 | <filename>systemd.swap</filename></para> | |
dd1eb43b LP |
55 | </refsynopsisdiv> |
56 | ||
57 | <refsect1> | |
58 | <title>Description</title> | |
59 | ||
9a666408 | 60 | <para>Unit configuration files for services, sockets, |
2292707d LP |
61 | mount points and swap devices share a subset of |
62 | configuration options which define the execution | |
63 | environment of spawned processes.</para> | |
dd1eb43b LP |
64 | |
65 | <para>This man page lists the configuration options | |
9a666408 | 66 | shared by these four unit types. See |
dd1eb43b LP |
67 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
68 | for the common options of all unit configuration | |
69 | files, and | |
2292707d LP |
70 | <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>, |
71 | <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
72 | <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
dd1eb43b LP |
73 | and |
74 | <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
75 | for more information on the specific unit | |
76 | configuration files. The execution specific | |
77 | configuration options are configured in the [Service], | |
16dad32e | 78 | [Socket], [Mount], or [Swap] sections, depending on the unit |
dd1eb43b LP |
79 | type.</para> |
80 | </refsect1> | |
81 | ||
82 | <refsect1> | |
83 | <title>Options</title> | |
84 | ||
ccc9a4f9 | 85 | <variablelist class='unit-directives'> |
dd1eb43b LP |
86 | |
87 | <varlistentry> | |
88 | <term><varname>WorkingDirectory=</varname></term> | |
89 | ||
90 | <listitem><para>Takes an absolute | |
91 | directory path. Sets the working | |
e06c73cc LP |
92 | directory for executed processes. If |
93 | not set defaults to the root directory | |
94 | when systemd is running as a system | |
95 | instance and the respective user's | |
96 | home directory if run as | |
97 | user.</para></listitem> | |
dd1eb43b LP |
98 | </varlistentry> |
99 | ||
100 | <varlistentry> | |
101 | <term><varname>RootDirectory=</varname></term> | |
102 | ||
103 | <listitem><para>Takes an absolute | |
104 | directory path. Sets the root | |
105 | directory for executed processes, with | |
106 | the | |
107 | <citerefentry><refentrytitle>chroot</refentrytitle><manvolnum>2</manvolnum></citerefentry> | |
108 | system call. If this is used it must | |
109 | be ensured that the process and all | |
110 | its auxiliary files are available in | |
111 | the <function>chroot()</function> | |
112 | jail.</para></listitem> | |
113 | </varlistentry> | |
114 | ||
115 | <varlistentry> | |
116 | <term><varname>User=</varname></term> | |
117 | <term><varname>Group=</varname></term> | |
118 | ||
119 | <listitem><para>Sets the Unix user | |
16dad32e AE |
120 | or group that the processes are executed |
121 | as, respectively. Takes a single user or group | |
dd1eb43b | 122 | name or ID as argument. If no group is |
16dad32e | 123 | set, the default group of the user is |
dd1eb43b LP |
124 | chosen.</para></listitem> |
125 | </varlistentry> | |
126 | ||
127 | <varlistentry> | |
128 | <term><varname>SupplementaryGroups=</varname></term> | |
129 | ||
130 | <listitem><para>Sets the supplementary | |
131 | Unix groups the processes are executed | |
96d4ce01 | 132 | as. This takes a space separated list |
dd1eb43b LP |
133 | of group names or IDs. This option may |
134 | be specified more than once in which | |
135 | case all listed groups are set as | |
74051b9b LP |
136 | supplementary groups. When the empty |
137 | string is assigned the list of | |
138 | supplementary groups is reset, and all | |
139 | assignments prior to this one will | |
140 | have no effect. In any way, this | |
141 | option does not override, but extends | |
142 | the list of supplementary groups | |
143 | configured in the system group | |
144 | database for the | |
dd1eb43b LP |
145 | user.</para></listitem> |
146 | </varlistentry> | |
147 | ||
148 | <varlistentry> | |
149 | <term><varname>Nice=</varname></term> | |
150 | ||
151 | <listitem><para>Sets the default nice | |
152 | level (scheduling priority) for | |
153 | executed processes. Takes an integer | |
154 | between -20 (highest priority) and 19 | |
155 | (lowest priority). See | |
156 | <citerefentry><refentrytitle>setpriority</refentrytitle><manvolnum>2</manvolnum></citerefentry> | |
157 | for details.</para></listitem> | |
158 | </varlistentry> | |
159 | ||
160 | <varlistentry> | |
dd6c17b1 | 161 | <term><varname>OOMScoreAdjust=</varname></term> |
dd1eb43b LP |
162 | |
163 | <listitem><para>Sets the adjustment | |
164 | level for the Out-Of-Memory killer for | |
165 | executed processes. Takes an integer | |
dd6c17b1 LP |
166 | between -1000 (to disable OOM killing |
167 | for this process) and 1000 (to make | |
dd1eb43b LP |
168 | killing of this process under memory |
169 | pressure very likely). See <ulink | |
170 | url="http://www.kernel.org/doc/Documentation/filesystems/proc.txt">proc.txt</ulink> | |
171 | for details.</para></listitem> | |
172 | </varlistentry> | |
173 | ||
174 | <varlistentry> | |
175 | <term><varname>IOSchedulingClass=</varname></term> | |
176 | ||
177 | <listitem><para>Sets the IO scheduling | |
178 | class for executed processes. Takes an | |
179 | integer between 0 and 3 or one of the | |
180 | strings <option>none</option>, | |
181 | <option>realtime</option>, | |
182 | <option>best-effort</option> or | |
183 | <option>idle</option>. See | |
184 | <citerefentry><refentrytitle>ioprio_set</refentrytitle><manvolnum>2</manvolnum></citerefentry> | |
185 | for details.</para></listitem> | |
186 | </varlistentry> | |
187 | ||
188 | <varlistentry> | |
189 | <term><varname>IOSchedulingPriority=</varname></term> | |
190 | ||
191 | <listitem><para>Sets the IO scheduling | |
192 | priority for executed processes. Takes | |
193 | an integer between 0 (highest | |
194 | priority) and 7 (lowest priority). The | |
195 | available priorities depend on the | |
196 | selected IO scheduling class (see | |
197 | above). See | |
198 | <citerefentry><refentrytitle>ioprio_set</refentrytitle><manvolnum>2</manvolnum></citerefentry> | |
199 | for details.</para></listitem> | |
200 | </varlistentry> | |
201 | ||
202 | <varlistentry> | |
203 | <term><varname>CPUSchedulingPolicy=</varname></term> | |
204 | ||
205 | <listitem><para>Sets the CPU | |
206 | scheduling policy for executed | |
207 | processes. Takes one of | |
208 | <option>other</option>, | |
209 | <option>batch</option>, | |
210 | <option>idle</option>, | |
211 | <option>fifo</option> or | |
212 | <option>rr</option>. See | |
213 | <citerefentry><refentrytitle>sched_setscheduler</refentrytitle><manvolnum>2</manvolnum></citerefentry> | |
214 | for details.</para></listitem> | |
215 | </varlistentry> | |
216 | ||
217 | <varlistentry> | |
218 | <term><varname>CPUSchedulingPriority=</varname></term> | |
219 | ||
220 | <listitem><para>Sets the CPU | |
221 | scheduling priority for executed | |
bb112710 | 222 | processes. The available priority |
dd1eb43b | 223 | range depends on the selected CPU |
bb112710 HHPF |
224 | scheduling policy (see above). For |
225 | real-time scheduling policies an | |
226 | integer between 1 (lowest priority) | |
227 | and 99 (highest priority) can be used. | |
228 | See <citerefentry><refentrytitle>sched_setscheduler</refentrytitle><manvolnum>2</manvolnum></citerefentry> | |
229 | for details. | |
230 | </para></listitem> | |
dd1eb43b LP |
231 | </varlistentry> |
232 | ||
233 | <varlistentry> | |
234 | <term><varname>CPUSchedulingResetOnFork=</varname></term> | |
235 | ||
236 | <listitem><para>Takes a boolean | |
237 | argument. If true elevated CPU | |
238 | scheduling priorities and policies | |
239 | will be reset when the executed | |
240 | processes fork, and can hence not leak | |
241 | into child processes. See | |
242 | <citerefentry><refentrytitle>sched_setscheduler</refentrytitle><manvolnum>2</manvolnum></citerefentry> | |
243 | for details. Defaults to false.</para></listitem> | |
244 | </varlistentry> | |
245 | ||
246 | <varlistentry> | |
247 | <term><varname>CPUAffinity=</varname></term> | |
248 | ||
249 | <listitem><para>Controls the CPU | |
250 | affinity of the executed | |
96d4ce01 | 251 | processes. Takes a space-separated |
74051b9b LP |
252 | list of CPU indexes. This option may |
253 | be specified more than once in which | |
254 | case the specificed CPU affinity masks | |
255 | are merged. If the empty string is | |
256 | assigned the mask is reset, all | |
257 | assignments prior to this will have no | |
258 | effect. See | |
dd1eb43b LP |
259 | <citerefentry><refentrytitle>sched_setaffinity</refentrytitle><manvolnum>2</manvolnum></citerefentry> |
260 | for details.</para></listitem> | |
261 | </varlistentry> | |
262 | ||
263 | <varlistentry> | |
264 | <term><varname>UMask=</varname></term> | |
265 | ||
266 | <listitem><para>Controls the file mode | |
267 | creation mask. Takes an access mode in | |
268 | octal notation. See | |
269 | <citerefentry><refentrytitle>umask</refentrytitle><manvolnum>2</manvolnum></citerefentry> | |
270 | for details. Defaults to | |
260d3708 | 271 | 0022.</para></listitem> |
dd1eb43b LP |
272 | </varlistentry> |
273 | ||
274 | <varlistentry> | |
275 | <term><varname>Environment=</varname></term> | |
276 | ||
277 | <listitem><para>Sets environment | |
278 | variables for executed | |
96d4ce01 | 279 | processes. Takes a space-separated |
dd1eb43b LP |
280 | list of variable assignments. This |
281 | option may be specified more than once | |
282 | in which case all listed variables | |
283 | will be set. If the same variable is | |
284 | set twice the later setting will | |
74051b9b LP |
285 | override the earlier setting. If the |
286 | empty string is assigned to this | |
287 | option the list of environment | |
288 | variables is reset, all prior | |
0ae9c92a FC |
289 | assignments have no effect. |
290 | Variable expansion is not performed | |
291 | inside the strings, and $ has no special | |
292 | meaning. | |
293 | If you need to assign a value containing spaces | |
294 | to a variable, use double quotes (") | |
295 | for the assignment.</para> | |
296 | ||
297 | <para>Example: | |
298 | <programlisting>Environment="VAR1=word1 word2" VAR2=word3 "VAR3=word 5 6"</programlisting> | |
299 | gives three variables <literal>VAR1</literal>, | |
300 | <literal>VAR2</literal>, <literal>VAR3</literal>. | |
301 | </para> | |
302 | ||
303 | <para> | |
304 | See | |
dd1eb43b | 305 | <citerefentry><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry> |
0ae9c92a | 306 | for details about environment variables.</para></listitem> |
dd1eb43b LP |
307 | </varlistentry> |
308 | <varlistentry> | |
309 | <term><varname>EnvironmentFile=</varname></term> | |
310 | <listitem><para>Similar to | |
311 | <varname>Environment=</varname> but | |
312 | reads the environment variables from a | |
313 | text file. The text file should | |
96d4ce01 | 314 | contain new-line separated variable |
dd1eb43b LP |
315 | assignments. Empty lines and lines |
316 | starting with ; or # will be ignored, | |
565d91fd MV |
317 | which may be used for commenting. A line |
318 | ending with a backslash will be concatenated | |
319 | with the following one, allowing multiline variable | |
320 | definitions. The parser strips leading | |
321 | and trailing whitespace from the values | |
7734f773 | 322 | of assignments, unless you use |
74051b9b LP |
323 | double quotes (").</para> |
324 | ||
325 | <para>The argument passed should be an | |
326 | absolute file name or wildcard | |
327 | expression, optionally prefixed with | |
afe4bfe2 LP |
328 | "-", which indicates that if the file |
329 | does not exist it won't be read and no | |
74051b9b LP |
330 | error or warning message is logged. |
331 | This option may be specified more than | |
332 | once in which case all specified files | |
333 | are read. If the empty string is | |
334 | assigned to this option the list of | |
335 | file to read is reset, all prior | |
336 | assignments have no effect.</para> | |
337 | ||
338 | <para>The files listed with this | |
f1779fd2 LP |
339 | directive will be read shortly before |
340 | the process is executed. Settings from | |
341 | these files override settings made | |
342 | with | |
343 | <varname>Environment=</varname>. If | |
344 | the same variable is set twice from | |
345 | these files the files will be read in | |
346 | the order they are specified and the | |
347 | later setting will override the | |
74051b9b | 348 | earlier setting.</para></listitem> |
dd1eb43b LP |
349 | </varlistentry> |
350 | ||
351 | <varlistentry> | |
352 | <term><varname>StandardInput=</varname></term> | |
353 | <listitem><para>Controls where file | |
354 | descriptor 0 (STDIN) of the executed | |
355 | processes is connected to. Takes one | |
356 | of <option>null</option>, | |
357 | <option>tty</option>, | |
358 | <option>tty-force</option>, | |
359 | <option>tty-fail</option> or | |
360 | <option>socket</option>. If | |
361 | <option>null</option> is selected | |
362 | standard input will be connected to | |
363 | <filename>/dev/null</filename>, | |
364 | i.e. all read attempts by the process | |
365 | will result in immediate EOF. If | |
366 | <option>tty</option> is selected | |
367 | standard input is connected to a TTY | |
368 | (as configured by | |
369 | <varname>TTYPath=</varname>, see | |
370 | below) and the executed process | |
371 | becomes the controlling process of the | |
372 | terminal. If the terminal is already | |
f8553ccb AE |
373 | being controlled by another process the |
374 | executed process waits until the current | |
375 | controlling process releases the | |
376 | terminal. | |
377 | <option>tty-force</option> | |
dd1eb43b LP |
378 | is similar to <option>tty</option>, |
379 | but the executed process is forcefully | |
380 | and immediately made the controlling | |
381 | process of the terminal, potentially | |
382 | removing previous controlling | |
383 | processes from the | |
384 | terminal. <option>tty-fail</option> is | |
385 | similar to <option>tty</option> but if | |
386 | the terminal already has a controlling | |
387 | process start-up of the executed | |
388 | process fails. The | |
389 | <option>socket</option> option is only | |
390 | valid in socket-activated services, | |
391 | and only when the socket configuration | |
392 | file (see | |
393 | <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
394 | for details) specifies a single socket | |
395 | only. If this option is set standard | |
396 | input will be connected to the socket | |
397 | the service was activated from, which | |
398 | is primarily useful for compatibility | |
399 | with daemons designed for use with the | |
400 | traditional | |
401 | <citerefentry><refentrytitle>inetd</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
402 | daemon. This setting defaults to | |
403 | <option>null</option>.</para></listitem> | |
404 | </varlistentry> | |
405 | <varlistentry> | |
406 | <term><varname>StandardOutput=</varname></term> | |
407 | <listitem><para>Controls where file | |
408 | descriptor 1 (STDOUT) of the executed | |
409 | processes is connected to. Takes one | |
410 | of <option>inherit</option>, | |
411 | <option>null</option>, | |
412 | <option>tty</option>, | |
413 | <option>syslog</option>, | |
28dbc1e8 | 414 | <option>kmsg</option>, |
706343f4 LP |
415 | <option>journal</option>, |
416 | <option>syslog+console</option>, | |
28dbc1e8 | 417 | <option>kmsg+console</option>, |
706343f4 | 418 | <option>journal+console</option> or |
dd1eb43b LP |
419 | <option>socket</option>. If set to |
420 | <option>inherit</option> the file | |
421 | descriptor of standard input is | |
422 | duplicated for standard output. If set | |
423 | to <option>null</option> standard | |
424 | output will be connected to | |
425 | <filename>/dev/null</filename>, | |
426 | i.e. everything written to it will be | |
427 | lost. If set to <option>tty</option> | |
428 | standard output will be connected to a | |
429 | tty (as configured via | |
430 | <varname>TTYPath=</varname>, see | |
431 | below). If the TTY is used for output | |
432 | only the executed process will not | |
433 | become the controlling process of the | |
434 | terminal, and will not fail or wait | |
435 | for other processes to release the | |
436 | terminal. <option>syslog</option> | |
437 | connects standard output to the | |
438 | <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry> | |
346bce1f LP |
439 | system syslog |
440 | service. <option>kmsg</option> | |
dd1eb43b LP |
441 | connects it with the kernel log buffer |
442 | which is accessible via | |
706343f4 LP |
443 | <citerefentry><refentrytitle>dmesg</refentrytitle><manvolnum>1</manvolnum></citerefentry>. <option>journal</option> |
444 | connects it with the journal which is | |
445 | accessible via | |
169c4f65 | 446 | <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> |
706343f4 LP |
447 | (Note that everything that is written |
448 | to syslog or kmsg is implicitly stored | |
449 | in the journal as well, those options | |
450 | are hence supersets of this | |
451 | one). <option>syslog+console</option>, | |
452 | <option>journal+console</option> and | |
453 | <option>kmsg+console</option> work | |
28dbc1e8 LP |
454 | similarly but copy the output to the |
455 | system console as | |
456 | well. <option>socket</option> connects | |
457 | standard output to a socket from | |
458 | socket activation, semantics are | |
dd1eb43b LP |
459 | similar to the respective option of |
460 | <varname>StandardInput=</varname>. | |
de6c78f8 LP |
461 | This setting defaults to the value set |
462 | with | |
463 | <option>DefaultStandardOutput=</option> | |
464 | in | |
465 | <citerefentry><refentrytitle>systemd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
466 | which defaults to | |
706343f4 | 467 | <option>journal</option>.</para></listitem> |
dd1eb43b LP |
468 | </varlistentry> |
469 | <varlistentry> | |
ad678a06 | 470 | <term><varname>StandardError=</varname></term> |
dd1eb43b LP |
471 | <listitem><para>Controls where file |
472 | descriptor 2 (STDERR) of the executed | |
473 | processes is connected to. The | |
474 | available options are identical to | |
475 | those of | |
ad678a06 | 476 | <varname>StandardOutput=</varname>, |
5471472d | 477 | with one exception: if set to |
dd1eb43b LP |
478 | <option>inherit</option> the file |
479 | descriptor used for standard output is | |
480 | duplicated for standard error. This | |
de6c78f8 LP |
481 | setting defaults to the value set with |
482 | <option>DefaultStandardError=</option> | |
483 | in | |
484 | <citerefentry><refentrytitle>systemd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
485 | which defaults to | |
dd1eb43b LP |
486 | <option>inherit</option>.</para></listitem> |
487 | </varlistentry> | |
488 | <varlistentry> | |
489 | <term><varname>TTYPath=</varname></term> | |
490 | <listitem><para>Sets the terminal | |
491 | device node to use if standard input, | |
492 | output or stderr are connected to a | |
493 | TTY (see above). Defaults to | |
494 | <filename>/dev/console</filename>.</para></listitem> | |
495 | </varlistentry> | |
6ea832a2 LP |
496 | <varlistentry> |
497 | <term><varname>TTYReset=</varname></term> | |
498 | <listitem><para>Reset the terminal | |
499 | device specified with | |
500 | <varname>TTYPath=</varname> before and | |
501 | after execution. Defaults to | |
502 | <literal>no</literal>.</para></listitem> | |
503 | </varlistentry> | |
504 | <varlistentry> | |
505 | <term><varname>TTYVHangup=</varname></term> | |
506 | <listitem><para>Disconnect all clients | |
507 | which have opened the terminal device | |
508 | specified with | |
509 | <varname>TTYPath=</varname> | |
510 | before and after execution. Defaults | |
511 | to | |
512 | <literal>no</literal>.</para></listitem> | |
513 | </varlistentry> | |
514 | <varlistentry> | |
515 | <term><varname>TTYVTDisallocate=</varname></term> | |
c5315881 | 516 | <listitem><para>If the terminal |
6ea832a2 LP |
517 | device specified with |
518 | <varname>TTYPath=</varname> is a | |
519 | virtual console terminal try to | |
520 | deallocate the TTY before and after | |
521 | execution. This ensures that the | |
522 | screen and scrollback buffer is | |
523 | cleared. Defaults to | |
524 | <literal>no</literal>.</para></listitem> | |
525 | </varlistentry> | |
dd1eb43b | 526 | <varlistentry> |
48c4fad9 | 527 | <term><varname>SyslogIdentifier=</varname></term> |
dd1eb43b LP |
528 | <listitem><para>Sets the process name |
529 | to prefix log lines sent to syslog or | |
530 | the kernel log buffer with. If not set | |
531 | defaults to the process name of the | |
532 | executed process. This option is only | |
533 | useful when | |
534 | <varname>StandardOutput=</varname> or | |
535 | <varname>StandardError=</varname> are | |
536 | set to <option>syslog</option> or | |
537 | <option>kmsg</option>.</para></listitem> | |
538 | </varlistentry> | |
539 | <varlistentry> | |
540 | <term><varname>SyslogFacility=</varname></term> | |
541 | <listitem><para>Sets the syslog | |
542 | facility to use when logging to | |
543 | syslog. One of <option>kern</option>, | |
544 | <option>user</option>, | |
545 | <option>mail</option>, | |
546 | <option>daemon</option>, | |
547 | <option>auth</option>, | |
548 | <option>syslog</option>, | |
549 | <option>lpr</option>, | |
550 | <option>news</option>, | |
551 | <option>uucp</option>, | |
552 | <option>cron</option>, | |
553 | <option>authpriv</option>, | |
554 | <option>ftp</option>, | |
555 | <option>local0</option>, | |
556 | <option>local1</option>, | |
557 | <option>local2</option>, | |
558 | <option>local3</option>, | |
559 | <option>local4</option>, | |
560 | <option>local5</option>, | |
561 | <option>local6</option> or | |
562 | <option>local7</option>. See | |
563 | <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry> | |
564 | for details. This option is only | |
565 | useful when | |
566 | <varname>StandardOutput=</varname> or | |
567 | <varname>StandardError=</varname> are | |
568 | set to <option>syslog</option>. | |
569 | Defaults to | |
570 | <option>daemon</option>.</para></listitem> | |
571 | </varlistentry> | |
572 | <varlistentry> | |
573 | <term><varname>SyslogLevel=</varname></term> | |
574 | <listitem><para>Default syslog level | |
575 | to use when logging to syslog or the | |
576 | kernel log buffer. One of | |
577 | <option>emerg</option>, | |
578 | <option>alert</option>, | |
579 | <option>crit</option>, | |
580 | <option>err</option>, | |
581 | <option>warning</option>, | |
582 | <option>notice</option>, | |
583 | <option>info</option>, | |
584 | <option>debug</option>. See | |
585 | <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry> | |
586 | for details. This option is only | |
587 | useful when | |
588 | <varname>StandardOutput=</varname> or | |
589 | <varname>StandardError=</varname> are | |
590 | set to <option>syslog</option> or | |
591 | <option>kmsg</option>. Note that | |
592 | individual lines output by the daemon | |
593 | might be prefixed with a different log | |
594 | level which can be used to override | |
595 | the default log level specified | |
596 | here. The interpretation of these | |
597 | prefixes may be disabled with | |
74922904 | 598 | <varname>SyslogLevelPrefix=</varname>, |
dd1eb43b | 599 | see below. For details see |
cb07866b | 600 | <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>. |
dd1eb43b LP |
601 | |
602 | Defaults to | |
603 | <option>info</option>.</para></listitem> | |
604 | </varlistentry> | |
605 | ||
606 | <varlistentry> | |
74922904 | 607 | <term><varname>SyslogLevelPrefix=</varname></term> |
dd1eb43b | 608 | <listitem><para>Takes a boolean |
74922904 | 609 | argument. If true and |
dd1eb43b LP |
610 | <varname>StandardOutput=</varname> or |
611 | <varname>StandardError=</varname> are | |
df688b23 LP |
612 | set to <option>syslog</option>, |
613 | <option>kmsg</option> or | |
614 | <option>journal</option>, log lines | |
dd1eb43b LP |
615 | written by the executed process that |
616 | are prefixed with a log level will be | |
617 | passed on to syslog with this log | |
618 | level set but the prefix removed. If | |
74922904 | 619 | set to false, the interpretation of |
dd1eb43b LP |
620 | these prefixes is disabled and the |
621 | logged lines are passed on as-is. For | |
622 | details about this prefixing see | |
cb07866b | 623 | <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>. |
74922904 | 624 | Defaults to true.</para></listitem> |
dd1eb43b LP |
625 | </varlistentry> |
626 | ||
627 | <varlistentry> | |
03fae018 | 628 | <term><varname>TimerSlackNSec=</varname></term> |
dd1eb43b LP |
629 | <listitem><para>Sets the timer slack |
630 | in nanoseconds for the executed | |
d88a251b LP |
631 | processes. The timer slack controls |
632 | the accuracy of wake-ups triggered by | |
03fae018 | 633 | timers. See |
dd1eb43b | 634 | <citerefentry><refentrytitle>prctl</refentrytitle><manvolnum>2</manvolnum></citerefentry> |
03fae018 LP |
635 | for more information. Note that in |
636 | contrast to most other time span | |
f8553ccb | 637 | definitions this parameter takes an |
d88a251b LP |
638 | integer value in nano-seconds if no |
639 | unit is specified. The usual time | |
640 | units are understood | |
641 | too.</para></listitem> | |
dd1eb43b LP |
642 | </varlistentry> |
643 | ||
644 | <varlistentry> | |
645 | <term><varname>LimitCPU=</varname></term> | |
646 | <term><varname>LimitFSIZE=</varname></term> | |
647 | <term><varname>LimitDATA=</varname></term> | |
648 | <term><varname>LimitSTACK=</varname></term> | |
649 | <term><varname>LimitCORE=</varname></term> | |
650 | <term><varname>LimitRSS=</varname></term> | |
651 | <term><varname>LimitNOFILE=</varname></term> | |
652 | <term><varname>LimitAS=</varname></term> | |
653 | <term><varname>LimitNPROC=</varname></term> | |
654 | <term><varname>LimitMEMLOCK=</varname></term> | |
655 | <term><varname>LimitLOCKS=</varname></term> | |
656 | <term><varname>LimitSIGPENDING=</varname></term> | |
657 | <term><varname>LimitMSGQUEUE=</varname></term> | |
658 | <term><varname>LimitNICE=</varname></term> | |
659 | <term><varname>LimitRTPRIO=</varname></term> | |
660 | <term><varname>LimitRTTIME=</varname></term> | |
661 | <listitem><para>These settings control | |
662 | various resource limits for executed | |
663 | processes. See | |
664 | <citerefentry><refentrytitle>setrlimit</refentrytitle><manvolnum>2</manvolnum></citerefentry> | |
3d57c6ab LP |
665 | for details. Use the string |
666 | <varname>infinity</varname> to | |
667 | configure no limit on a specific | |
668 | resource.</para></listitem> | |
dd1eb43b LP |
669 | </varlistentry> |
670 | ||
671 | <varlistentry> | |
672 | <term><varname>PAMName=</varname></term> | |
673 | <listitem><para>Sets the PAM service | |
674 | name to set up a session as. If set | |
675 | the executed process will be | |
676 | registered as a PAM session under the | |
677 | specified service name. This is only | |
678 | useful in conjunction with the | |
679 | <varname>User=</varname> setting. If | |
680 | not set no PAM session will be opened | |
681 | for the executed processes. See | |
682 | <citerefentry><refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
683 | for details.</para></listitem> | |
684 | </varlistentry> | |
685 | ||
686 | <varlistentry> | |
687 | <term><varname>TCPWrapName=</varname></term> | |
688 | <listitem><para>If this is a | |
689 | socket-activated service this sets the | |
690 | tcpwrap service name to check the | |
691 | permission for the current connection | |
692 | with. This is only useful in | |
693 | conjunction with socket-activated | |
694 | services, and stream sockets (TCP) in | |
695 | particular. It has no effect on other | |
9f056f40 LP |
696 | socket types (e.g. datagram/UDP) and |
697 | on processes unrelated to socket-based | |
dd1eb43b LP |
698 | activation. If the tcpwrap |
699 | verification fails daemon start-up | |
700 | will fail and the connection is | |
701 | terminated. See | |
702 | <citerefentry><refentrytitle>tcpd</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
9f056f40 LP |
703 | for details. Note that this option may |
704 | be used to do access control checks | |
705 | only. Shell commands and commands | |
706 | described in | |
707 | <citerefentry><refentrytitle>hosts_options</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
708 | are not supported.</para></listitem> | |
dd1eb43b LP |
709 | </varlistentry> |
710 | ||
711 | <varlistentry> | |
260abb78 LP |
712 | <term><varname>CapabilityBoundingSet=</varname></term> |
713 | ||
714 | <listitem><para>Controls which | |
715 | capabilities to include in the | |
716 | capability bounding set for the | |
717 | executed process. See | |
dd1eb43b | 718 | <citerefentry><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry> |
260abb78 | 719 | for details. Takes a whitespace |
9f7dad77 | 720 | separated list of capability names as |
260abb78 LP |
721 | read by |
722 | <citerefentry><refentrytitle>cap_from_name</refentrytitle><manvolnum>3</manvolnum></citerefentry>. | |
723 | Capabilities listed will be included | |
724 | in the bounding set, all others are | |
725 | removed. If the list of capabilities | |
726 | is prefixed with ~ all but the listed | |
727 | capabilities will be included, the | |
5f4b19f4 | 728 | effect of the assignment |
ec8927ca LP |
729 | inverted. Note that this option also |
730 | effects the respective capabilities in | |
731 | the effective, permitted and | |
732 | inheritable capability sets, on top of | |
733 | what <varname>Capabilities=</varname> | |
734 | does. If this option is not used the | |
260abb78 LP |
735 | capability bounding set is not |
736 | modified on process execution, hence | |
737 | no limits on the capabilities of the | |
74051b9b LP |
738 | process are enforced. This option may |
739 | appear more than once in which case | |
740 | the bounding sets are merged. If the empty | |
741 | string is assigned to this option the | |
742 | bounding set is reset, and all prior | |
743 | settings have no | |
744 | effect.</para></listitem> | |
dd1eb43b LP |
745 | </varlistentry> |
746 | ||
747 | <varlistentry> | |
748 | <term><varname>SecureBits=</varname></term> | |
749 | <listitem><para>Controls the secure | |
750 | bits set for the executed process. See | |
751 | <citerefentry><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry> | |
752 | for details. Takes a list of strings: | |
753 | <option>keep-caps</option>, | |
754 | <option>keep-caps-locked</option>, | |
755 | <option>no-setuid-fixup</option>, | |
756 | <option>no-setuid-fixup-locked</option>, | |
3377af3e | 757 | <option>noroot</option> and/or |
74051b9b LP |
758 | <option>noroot-locked</option>. This |
759 | option may appear more than once in | |
760 | which case the secure bits are | |
761 | ORed. If the empty string is assigned | |
762 | to this option the bits are reset to | |
763 | 0.</para></listitem> | |
dd1eb43b LP |
764 | </varlistentry> |
765 | ||
766 | <varlistentry> | |
260abb78 | 767 | <term><varname>Capabilities=</varname></term> |
dd1eb43b | 768 | <listitem><para>Controls the |
dd1eb43b | 769 | <citerefentry><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry> |
260abb78 LP |
770 | set for the executed process. Take a |
771 | capability string describing the | |
772 | effective, permitted and inherited | |
773 | capability sets as documented in | |
774 | <citerefentry><refentrytitle>cap_from_text</refentrytitle><manvolnum>3</manvolnum></citerefentry>. | |
775 | Note that these capability sets are | |
776 | usually influenced by the capabilities | |
777 | attached to the executed file. Due to | |
778 | that | |
779 | <varname>CapabilityBoundingSet=</varname> | |
780 | is probably the much more useful | |
781 | setting.</para></listitem> | |
dd1eb43b LP |
782 | </varlistentry> |
783 | ||
784 | <varlistentry> | |
785 | <term><varname>ControlGroup=</varname></term> | |
786 | ||
787 | <listitem><para>Controls the control | |
788 | groups the executed processes shall be | |
ad678a06 | 789 | made members of. Takes a |
96d4ce01 | 790 | space-separated list of cgroup |
74051b9b LP |
791 | identifiers. A cgroup identifier is |
792 | formatted like | |
dd1eb43b | 793 | <filename>cpu:/foo/bar</filename>, |
74051b9b | 794 | where "cpu" indicates the kernel |
dd1eb43b LP |
795 | control group controller used, and |
796 | <filename>/foo/bar</filename> is the | |
ab1f0633 LP |
797 | control group path. The controller |
798 | name and ":" may be omitted in which | |
799 | case the named systemd control group | |
dd1eb43b LP |
800 | hierarchy is implied. Alternatively, |
801 | the path and ":" may be omitted, in | |
802 | which case the default control group | |
74051b9b LP |
803 | path for this unit is implied.</para> |
804 | ||
805 | <para>This option may be used to place | |
806 | executed processes in arbitrary groups | |
807 | in arbitrary hierarchies -- which may | |
808 | then be externally configured with | |
809 | additional execution limits. By | |
810 | default systemd will place all | |
811 | executed processes in separate | |
812 | per-unit control groups (named after | |
813 | the unit) in the systemd named | |
814 | hierarchy. This option is primarily | |
815 | intended to place executed processes | |
816 | in specific paths in specific kernel | |
817 | controller hierarchies. It is not | |
ab1f0633 LP |
818 | recommended to manipulate the service |
819 | control group path in the systemd | |
820 | named hierarchy. For details about | |
821 | control groups see <ulink | |
74051b9b LP |
822 | url="http://www.kernel.org/doc/Documentation/cgroups/cgroups.txt">cgroups.txt</ulink>.</para> |
823 | ||
824 | <para>This option may appear more than | |
825 | once, in which case the list of | |
826 | control group assignments is | |
827 | merged. If the same hierarchy gets two | |
828 | different paths assigned only the | |
829 | later setting will take effect. If the | |
830 | empty string is assigned to this | |
831 | option the list of control group | |
832 | assignments is reset, all previous | |
833 | assignments will have no | |
834 | effect.</para> | |
835 | ||
836 | <para>Note that the list of control | |
837 | group assignments of a unit is | |
838 | extended implicitly based on the | |
839 | settings of | |
840 | <varname>DefaultControllers=</varname> | |
841 | of | |
842 | <citerefentry><refentrytitle>systemd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
843 | but a unit's | |
844 | <varname>ControlGroup=</varname> | |
845 | setting for a specific controller | |
846 | takes precedence.</para></listitem> | |
dd1eb43b LP |
847 | </varlistentry> |
848 | ||
ab1f0633 LP |
849 | <varlistentry> |
850 | <term><varname>ControlGroupModify=</varname></term> | |
851 | <listitem><para>Takes a boolean | |
852 | argument. If true, the control groups | |
853 | created for this unit will be owned by | |
854 | the user specified with | |
855 | <varname>User=</varname> (and the | |
856 | appropriate group), and he/she can create | |
857 | subgroups as well as add processes to | |
858 | the group.</para></listitem> | |
859 | </varlistentry> | |
860 | ||
8d53b453 | 861 | <varlistentry> |
891703e1 | 862 | <term><varname>ControlGroupPersistent=</varname></term> |
8d53b453 LP |
863 | <listitem><para>Takes a boolean |
864 | argument. If true, the control groups | |
865 | created for this unit will be marked | |
891703e1 | 866 | to be persistent, i.e. systemd will |
8d53b453 LP |
867 | not remove them when stopping the |
868 | unit. The default is false, meaning | |
869 | that the control groups will be | |
870 | removed when the unit is stopped. For | |
871 | details about the semantics of this | |
872 | logic see <ulink | |
873 | url="http://www.freedesktop.org/wiki/Software/systemd/PaxControlGroups">PaxControlGroups</ulink>.</para></listitem> | |
874 | </varlistentry> | |
875 | ||
ab1f0633 LP |
876 | <varlistentry> |
877 | <term><varname>ControlGroupAttribute=</varname></term> | |
878 | ||
879 | <listitem><para>Set a specific control | |
880 | group attribute for executed | |
c5315881 | 881 | processes, and (if needed) add the |
ab1f0633 LP |
882 | executed processes to a cgroup in the |
883 | hierarchy of the controller the | |
884 | attribute belongs to. Takes two | |
885 | space-separated arguments: the | |
886 | attribute name (syntax is | |
887 | <literal>cpu.shares</literal> where | |
888 | <literal>cpu</literal> refers to a | |
889 | specific controller and | |
890 | <literal>shares</literal> to the | |
891 | attribute name), and the attribute | |
892 | value. Example: | |
893 | <literal>ControlGroupAttribute=cpu.shares | |
894 | 512</literal>. If this option is used | |
895 | for an attribute that belongs to a | |
896 | kernel controller hierarchy the unit | |
897 | is not already configured to be added | |
898 | to (for example via the | |
899 | <literal>ControlGroup=</literal> | |
900 | option) then the unit will be added to | |
901 | the controller and the default unit | |
902 | cgroup path is implied. Thus, using | |
903 | <varname>ControlGroupAttribute=</varname> | |
74051b9b LP |
904 | is in most cases sufficient to make |
905 | use of control group enforcements, | |
ab1f0633 LP |
906 | explicit |
907 | <varname>ControlGroup=</varname> are | |
908 | only necessary in case the implied | |
909 | default control group path for a | |
910 | service is not desirable. For details | |
911 | about control group attributes see | |
912 | <ulink | |
913 | url="http://www.kernel.org/doc/Documentation/cgroups/cgroups.txt">cgroups.txt</ulink>. This | |
914 | option may appear more than once, in | |
915 | order to set multiple control group | |
74051b9b LP |
916 | attributes. If this option is used |
917 | multiple times for the same cgroup | |
918 | attribute only the later setting takes | |
919 | effect. If the empty string is | |
920 | assigned to this option the list of | |
921 | attributes is reset, all previous | |
922 | cgroup attribute settings have no | |
923 | effect, including those done with | |
924 | <varname>CPUShares=</varname>, | |
925 | <varname>MemoryLimit=</varname>, | |
926 | <varname>MemorySoftLimit</varname>, | |
927 | <varname>DeviceAllow=</varname>, | |
928 | <varname>DeviceDeny=</varname>, | |
929 | <varname>BlockIOWeight=</varname>, | |
930 | <varname>BlockIOReadBandwidth=</varname>, | |
931 | <varname>BlockIOWriteBandwidth=</varname>. | |
932 | </para></listitem> | |
ab1f0633 LP |
933 | </varlistentry> |
934 | ||
935 | <varlistentry> | |
936 | <term><varname>CPUShares=</varname></term> | |
937 | ||
938 | <listitem><para>Assign the specified | |
9e372868 LP |
939 | overall CPU time shares to the |
940 | processes executed. Takes an integer | |
941 | value. This controls the | |
ab1f0633 | 942 | <literal>cpu.shares</literal> control |
9e372868 LP |
943 | group attribute, which defaults to |
944 | 1024. For details about this control | |
945 | group attribute see <ulink | |
ab1f0633 LP |
946 | url="http://www.kernel.org/doc/Documentation/scheduler/sched-design-CFS.txt">sched-design-CFS.txt</ulink>.</para></listitem> |
947 | </varlistentry> | |
948 | ||
949 | <varlistentry> | |
950 | <term><varname>MemoryLimit=</varname></term> | |
951 | <term><varname>MemorySoftLimit=</varname></term> | |
952 | ||
953 | <listitem><para>Limit the overall memory usage | |
954 | of the executed processes to a certain | |
955 | size. Takes a memory size in bytes. If | |
956 | the value is suffixed with K, M, G or | |
957 | T the specified memory size is parsed | |
9e372868 | 958 | as Kilobytes, Megabytes, Gigabytes, |
16dad32e AE |
959 | or Terabytes (to the base |
960 | 1024), respectively. This controls the | |
ab1f0633 LP |
961 | <literal>memory.limit_in_bytes</literal> |
962 | and | |
963 | <literal>memory.soft_limit_in_bytes</literal> | |
964 | control group attributes. For details | |
965 | about these control group attributes | |
966 | see <ulink | |
967 | url="http://www.kernel.org/doc/Documentation/cgroups/memory.txt">memory.txt</ulink>.</para></listitem> | |
968 | </varlistentry> | |
969 | ||
970 | <varlistentry> | |
971 | <term><varname>DeviceAllow=</varname></term> | |
972 | <term><varname>DeviceDeny=</varname></term> | |
973 | ||
974 | <listitem><para>Control access to | |
975 | specific device nodes by the executed processes. Takes two | |
976 | space separated strings: a device node | |
977 | path (such as | |
978 | <filename>/dev/null</filename>) | |
979 | followed by a combination of r, w, m | |
16dad32e | 980 | to control reading, writing, or |
ab1f0633 | 981 | creating of the specific device node |
16dad32e | 982 | by the unit, respectively. This controls the |
ab1f0633 LP |
983 | <literal>devices.allow</literal> |
984 | and | |
985 | <literal>devices.deny</literal> | |
986 | control group attributes. For details | |
987 | about these control group attributes | |
988 | see <ulink | |
989 | url="http://www.kernel.org/doc/Documentation/cgroups/devices.txt">devices.txt</ulink>.</para></listitem> | |
990 | </varlistentry> | |
991 | ||
9e372868 LP |
992 | <varlistentry> |
993 | <term><varname>BlockIOWeight=</varname></term> | |
994 | ||
995 | <listitem><para>Set the default or | |
996 | per-device overall block IO weight | |
997 | value for the executed | |
998 | processes. Takes either a single | |
999 | weight value (between 10 and 1000) to | |
1000 | set the default block IO weight, or a | |
94959f0f LP |
1001 | space separated pair of a file path |
1002 | and a weight value to specify the | |
9e372868 | 1003 | device specific weight value (Example: |
94959f0f LP |
1004 | "/dev/sda 500"). The file path may be |
1005 | specified as path to a block device | |
1006 | node or as any other file in which | |
1007 | case the backing block device of the | |
1008 | file system of the file is | |
1009 | determined. This controls the | |
9e372868 LP |
1010 | <literal>blkio.weight</literal> and |
1011 | <literal>blkio.weight_device</literal> | |
1012 | control group attributes, which | |
1013 | default to 1000. Use this option | |
1014 | multiple times to set weights for | |
1015 | multiple devices. For details about | |
1016 | these control group attributes see | |
1017 | <ulink | |
1018 | url="http://www.kernel.org/doc/Documentation/cgroups/blkio-controller.txt">blkio-controller.txt</ulink>.</para></listitem> | |
1019 | </varlistentry> | |
1020 | ||
1021 | <varlistentry> | |
1022 | <term><varname>BlockIOReadBandwidth=</varname></term> | |
1023 | <term><varname>BlockIOWriteBandwidth=</varname></term> | |
1024 | ||
1025 | <listitem><para>Set the per-device | |
49f43d5f | 1026 | overall block IO bandwidth limit for |
94959f0f LP |
1027 | the executed processes. Takes a space |
1028 | separated pair of a file path and a | |
49f43d5f | 1029 | bandwidth value (in bytes per second) |
94959f0f LP |
1030 | to specify the device specific |
1031 | bandwidth. The file path may be | |
1032 | specified as path to a block device | |
1033 | node or as any other file in which | |
1034 | case the backing block device of the | |
1035 | file system of the file is determined. | |
49f43d5f VS |
1036 | If the bandwidth is suffixed with K, M, |
1037 | G, or T the specified bandwidth is | |
94959f0f | 1038 | parsed as Kilobytes, Megabytes, |
16dad32e | 1039 | Gigabytes, or Terabytes, respectively (Example: |
94959f0f LP |
1040 | "/dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0 |
1041 | 5M"). This controls the | |
9e372868 LP |
1042 | <literal>blkio.read_bps_device</literal> |
1043 | and | |
1044 | <literal>blkio.write_bps_device</literal> | |
1045 | control group attributes. Use this | |
49f43d5f | 1046 | option multiple times to set bandwidth |
9e372868 LP |
1047 | limits for multiple devices. For |
1048 | details about these control group | |
1049 | attributes see <ulink | |
1050 | url="http://www.kernel.org/doc/Documentation/cgroups/blkio-controller.txt">blkio-controller.txt</ulink>.</para></listitem> | |
1051 | </varlistentry> | |
1052 | ||
dd1eb43b LP |
1053 | <varlistentry> |
1054 | <term><varname>ReadWriteDirectories=</varname></term> | |
1055 | <term><varname>ReadOnlyDirectories=</varname></term> | |
1056 | <term><varname>InaccessibleDirectories=</varname></term> | |
1057 | ||
1058 | <listitem><para>Sets up a new | |
1059 | file-system name space for executed | |
1060 | processes. These options may be used | |
1061 | to limit access a process might have | |
1062 | to the main file-system | |
1063 | hierarchy. Each setting takes a | |
96d4ce01 | 1064 | space-separated list of absolute |
dd1eb43b LP |
1065 | directory paths. Directories listed in |
1066 | <varname>ReadWriteDirectories=</varname> | |
1067 | are accessible from within the | |
1068 | namespace with the same access rights | |
1069 | as from outside. Directories listed in | |
1070 | <varname>ReadOnlyDirectories=</varname> | |
1071 | are accessible for reading only, | |
1072 | writing will be refused even if the | |
1073 | usual file access controls would | |
1074 | permit this. Directories listed in | |
1075 | <varname>InaccessibleDirectories=</varname> | |
74051b9b LP |
1076 | will be made inaccessible for |
1077 | processes inside the namespace. Note | |
1078 | that restricting access with these | |
1079 | options does not extend to submounts | |
1080 | of a directory. You must list | |
1081 | submounts separately in these settings | |
1082 | to ensure the same limited | |
1083 | access. These options may be specified | |
1084 | more than once in which case all | |
1085 | directories listed will have limited | |
1086 | access from within the namespace. If | |
1087 | the empty string is assigned to this | |
1088 | option the specific list is reset, and | |
1089 | all prior assignments have no | |
1090 | effect.</para></listitem> | |
dd1eb43b LP |
1091 | </varlistentry> |
1092 | ||
1093 | <varlistentry> | |
1094 | <term><varname>PrivateTmp=</varname></term> | |
1095 | ||
1096 | <listitem><para>Takes a boolean | |
ff01d048 LP |
1097 | argument. If true sets up a new file |
1098 | system namespace for the executed | |
652d0dd7 ZJS |
1099 | processes and mounts private |
1100 | <filename>/tmp</filename> and | |
1101 | <filename>/var/tmp</filename> directories | |
1102 | inside it, that are not shared by | |
dd1eb43b LP |
1103 | processes outside of the |
1104 | namespace. This is useful to secure | |
1105 | access to temporary files of the | |
1106 | process, but makes sharing between | |
1107 | processes via | |
652d0dd7 ZJS |
1108 | <filename>/tmp</filename> or |
1109 | <filename>/var/tmp</filename> | |
ff01d048 LP |
1110 | impossible. Defaults to |
1111 | false.</para></listitem> | |
1112 | </varlistentry> | |
1113 | ||
1114 | <varlistentry> | |
1115 | <term><varname>PrivateNetwork=</varname></term> | |
1116 | ||
1117 | <listitem><para>Takes a boolean | |
1118 | argument. If true sets up a new | |
1119 | network namespace for the executed | |
1120 | processes and configures only the | |
1121 | loopback network device | |
1122 | <literal>lo</literal> inside it. No | |
1123 | other network devices will be | |
1124 | available to the executed process. | |
1125 | This is useful to securely turn off | |
1126 | network access by the executed | |
1127 | process. Defaults to | |
1128 | false.</para></listitem> | |
dd1eb43b LP |
1129 | </varlistentry> |
1130 | ||
1131 | <varlistentry> | |
1132 | <term><varname>MountFlags=</varname></term> | |
1133 | ||
1134 | <listitem><para>Takes a mount | |
1135 | propagation flag: | |
1136 | <option>shared</option>, | |
1137 | <option>slave</option> or | |
1138 | <option>private</option>, which | |
ac0930c8 LP |
1139 | control whether the file system |
1140 | namespace set up for this unit's | |
1141 | processes will receive or propagate | |
1142 | new mounts. See | |
8050c221 | 1143 | <citerefentry><refentrytitle>mount</refentrytitle><manvolnum>2</manvolnum></citerefentry> |
ac0930c8 LP |
1144 | for details. Default to |
1145 | <option>shared</option>.</para></listitem> | |
dd1eb43b LP |
1146 | </varlistentry> |
1147 | ||
169c1bda LP |
1148 | <varlistentry> |
1149 | <term><varname>UtmpIdentifier=</varname></term> | |
1150 | ||
c5315881 | 1151 | <listitem><para>Takes a four |
169c1bda LP |
1152 | character identifier string for an |
1153 | utmp/wtmp entry for this service. This | |
1154 | should only be set for services such | |
1155 | as <command>getty</command> | |
1156 | implementations where utmp/wtmp | |
1157 | entries must be created and cleared | |
1158 | before and after execution. If the | |
1159 | configured string is longer than four | |
1160 | characters it is truncated and the | |
1161 | terminal four characters are | |
1162 | used. This setting interprets %I style | |
1163 | string replacements. This setting is | |
1164 | unset by default, i.e. no utmp/wtmp | |
1165 | entries are created or cleaned up for | |
1166 | this service.</para></listitem> | |
1167 | </varlistentry> | |
1168 | ||
353e12c2 LP |
1169 | <varlistentry> |
1170 | <term><varname>IgnoreSIGPIPE=</varname></term> | |
1171 | ||
1172 | <listitem><para>Takes a boolean | |
1173 | argument. If true causes SIGPIPE to be | |
1174 | ignored in the executed | |
1175 | process. Defaults to true, since | |
1176 | SIGPIPE generally is useful only in | |
1177 | shell pipelines.</para></listitem> | |
1178 | </varlistentry> | |
1179 | ||
8351ceae LP |
1180 | <varlistentry> |
1181 | <term><varname>NoNewPrivileges=</varname></term> | |
1182 | ||
1183 | <listitem><para>Takes a boolean | |
1184 | argument. If true ensures that the | |
1185 | service process and all its children | |
1186 | can never gain new privileges. This | |
1187 | option is more powerful than the respective | |
1188 | secure bits flags (see above), as it | |
1189 | also prohibits UID changes of any | |
1190 | kind. This is the simplest, most | |
1191 | effective way to ensure that a process | |
1192 | and its children can never elevate | |
1193 | privileges again.</para></listitem> | |
1194 | </varlistentry> | |
1195 | ||
1196 | <varlistentry> | |
1197 | <term><varname>SystemCallFilter=</varname></term> | |
1198 | ||
1199 | <listitem><para>Takes a space | |
1200 | separated list of system call | |
1201 | names. If this setting is used all | |
1202 | system calls executed by the unit | |
1203 | process except for the listed ones | |
1204 | will result in immediate process | |
1205 | termination with the SIGSYS signal | |
1206 | (whitelisting). If the first character | |
1207 | of the list is <literal>~</literal> | |
1208 | the effect is inverted: only the | |
1209 | listed system calls will result in | |
1210 | immediate process termination | |
1211 | (blacklisting). If this option is used | |
1212 | <varname>NoNewPrivileges=yes</varname> | |
1213 | is implied. This feature makes use of | |
1214 | the Secure Computing Mode 2 interfaces | |
1215 | of the kernel ('seccomp filtering') | |
1216 | and is useful for enforcing a minimal | |
1217 | sandboxing environment. Note that the | |
1218 | <function>execve</function>, | |
1219 | <function>rt_sigreturn</function>, | |
1220 | <function>sigreturn</function>, | |
1221 | <function>exit_group</function>, | |
1222 | <function>exit</function> system calls | |
1223 | are implicitly whitelisted and don't | |
74051b9b LP |
1224 | need to be listed explicitly. This |
1225 | option may be specified more than once | |
1226 | in which case the filter masks are | |
1227 | merged. If the empty string is | |
1228 | assigned the filter is reset, all | |
1229 | prior assignments will have no | |
1230 | effect.</para></listitem> | |
8351ceae LP |
1231 | </varlistentry> |
1232 | ||
dd1eb43b LP |
1233 | </variablelist> |
1234 | </refsect1> | |
1235 | ||
1236 | <refsect1> | |
1237 | <title>See Also</title> | |
1238 | <para> | |
f3e219a2 | 1239 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, |
dd1eb43b | 1240 | <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>, |
169c4f65 | 1241 | <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>, |
dd1eb43b LP |
1242 | <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>, |
1243 | <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
1244 | <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
2292707d | 1245 | <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>, |
4819ff03 | 1246 | <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>, |
9cc2c8b7 ZJS |
1247 | <citerefentry><refentrytitle>systemd.kill</refentrytitle><manvolnum>5</manvolnum></citerefentry>, |
1248 | <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry> | |
dd1eb43b LP |
1249 | </para> |
1250 | </refsect1> | |
1251 | ||
1252 | </refentry> |