tmpfiles.d.xml revision 9d261cbdbe011fcaf1b96661c62b3882409dc690
97a9a944b5887e91042b019776c41d5dd74557aferikabele<!--*-nxml-*-->
97a9a944b5887e91042b019776c41d5dd74557aferikabele<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive This file is part of systemd.
5a58787efeb02a1c3f06569d019ad81fd2efa06end Copyright 2010 Brandon Philips
5a58787efeb02a1c3f06569d019ad81fd2efa06end systemd is free software; you can redistribute it and/or modify it
5a58787efeb02a1c3f06569d019ad81fd2efa06end under the terms of the GNU Lesser General Public License as published by
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen the Free Software Foundation; either version 2.1 of the License, or
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen (at your option) any later version.
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen systemd is distributed in the hope that it will be useful, but
5a58787efeb02a1c3f06569d019ad81fd2efa06end WITHOUT ANY WARRANTY; without even the implied warranty of
5a58787efeb02a1c3f06569d019ad81fd2efa06end MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5a58787efeb02a1c3f06569d019ad81fd2efa06end Lesser General Public License for more details.
3f08db06526d6901aa08c110b5bc7dde6bc39905nd You should have received a copy of the GNU Lesser General Public License
5a58787efeb02a1c3f06569d019ad81fd2efa06end along with systemd; If not, see <http://www.gnu.org/licenses/>.
5a58787efeb02a1c3f06569d019ad81fd2efa06end <refentryinfo>
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd <authorgroup>
5a58787efeb02a1c3f06569d019ad81fd2efa06end </authorgroup>
5a58787efeb02a1c3f06569d019ad81fd2efa06end </refentryinfo>
b21197dc8e6b8c764fdcc24d4bae8b0eebb6bc4end <refnamediv>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive <refpurpose>Configuration for creation, deletion and cleaning of
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive volatile and temporary files</refpurpose>
97a9a944b5887e91042b019776c41d5dd74557aferikabele </refnamediv>
ffb01336be79c64046b636e59fa8ddca8ec029edsf <refsynopsisdiv>
f8396ed8364b56ec8adeaa49cac35a929758a29eslive <para><filename>/etc/tmpfiles.d/*.conf</filename></para>
f8396ed8364b56ec8adeaa49cac35a929758a29eslive <para><filename>/run/tmpfiles.d/*.conf</filename></para>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <para><filename>/usr/lib/tmpfiles.d/*.conf</filename></para>
5a58787efeb02a1c3f06569d019ad81fd2efa06end </refsynopsisdiv>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <refsect1>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd <para><command>systemd-tmpfiles</command> uses the configuration
117c1f888a14e73cdd821dc6c23eb0411144a41cnd files from the above directories to describe the creation,
4a31db3c3a0202003c1b9f87affa7cc143e120e5sf cleaning and removal of volatile and temporary files and
117c1f888a14e73cdd821dc6c23eb0411144a41cnd directories which usually reside in directories such as
ffb01336be79c64046b636e59fa8ddca8ec029edsf <filename>/run</filename> or <filename>/tmp</filename>.</para>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd <para>Volatile and temporary files and directories are those
2bc7f1cf720973a67f8ff7a8d523e40569ae5b6cnd <filename>/var/run</filename>), <filename>/tmp</filename>,
117c1f888a14e73cdd821dc6c23eb0411144a41cnd <filename>/var/tmp</filename>, the API file systems such as
117c1f888a14e73cdd821dc6c23eb0411144a41cnd <filename>/sys</filename> or <filename>/proc</filename>, as well
117c1f888a14e73cdd821dc6c23eb0411144a41cnd as some other directories below <filename>/var</filename>.</para>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd <para>System daemons frequently require private runtime
117c1f888a14e73cdd821dc6c23eb0411144a41cnd directories below <filename>/run</filename> to place communication
87ffb6e33f3cbef3b9bb406cc2d27039fa336eaatrawick sockets and similar in. For these, consider declaring them in
4db28ee269aa06f7c6232e11cd01f58c3349af23noodl their unit files using <varname>RuntimeDirectory=</varname> (see
5a58787efeb02a1c3f06569d019ad81fd2efa06end <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
5a58787efeb02a1c3f06569d019ad81fd2efa06end for details), if this is feasible.</para>
5a58787efeb02a1c3f06569d019ad81fd2efa06end </refsect1>
5a58787efeb02a1c3f06569d019ad81fd2efa06end <refsect1>
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh <para>Each configuration file shall be named in the style of
5a58787efeb02a1c3f06569d019ad81fd2efa06end <filename><replaceable>package</replaceable>.conf</filename> or
5a58787efeb02a1c3f06569d019ad81fd2efa06end <filename><replaceable>package</replaceable>-<replaceable>part</replaceable>.conf</filename>.
5a58787efeb02a1c3f06569d019ad81fd2efa06end The second variant should be used when it is desirable to make it
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf easy to override just this part of configuration.</para>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <para>Files in <filename>/etc/tmpfiles.d</filename> override files
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick with the same name in <filename>/usr/lib/tmpfiles.d</filename> and
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <filename>/run/tmpfiles.d</filename> override files with the same
654d8eb036bedc99e90e11910ee02d3421417697rbowen name in <filename>/usr/lib/tmpfiles.d</filename>. Packages should
06ba4a61654b3763ad65f52283832ebf058fdf1cslive install their configuration files in
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <filename>/etc/tmpfiles.d</filename> are reserved for the local
b1b0d8ff12f69d873f28a9bf79dfba6b67b45a4bigalic administrator, who may use this logic to override the
97a9a944b5887e91042b019776c41d5dd74557aferikabele configuration files installed by vendor packages. All
654d8eb036bedc99e90e11910ee02d3421417697rbowen configuration files are sorted by their filename in lexicographic
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive order, regardless of which of the directories they reside in. If
97a9a944b5887e91042b019776c41d5dd74557aferikabele multiple files specify the same path, the entry in the file with
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive the lexicographically earliest name will be applied. All other
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive conflicting entries will be logged as errors. When two lines are
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive prefix and suffix of each other, then the prefix is always
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive processed first, the suffix later. Lines that take globs are
ffb01336be79c64046b636e59fa8ddca8ec029edsf applied after those accepting no globs. If multiple operations
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick shall be applied on the same file (such as ACL, xattr, file
ffb01336be79c64046b636e59fa8ddca8ec029edsf attribute adjustments) these are always done in the same fixed
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick order. Otherwise, the files/directories are processed in the order
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick they are listed.</para>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <para>If the administrator wants to disable a configuration file
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick supplied by the vendor, the recommended way is to place a symlink
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <filename>/etc/tmpfiles.d/</filename> bearing the same filename.
ffb01336be79c64046b636e59fa8ddca8ec029edsf <para>The configuration format is one line per path containing
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick type, path, mode, ownership, age, and argument fields:</para>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <programlisting>#Type Path Mode UID GID Age Argument
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf <para>Fields may be enclosed within quotes and contain C-style escapes.</para>
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf <para>The type consists of a single letter and optionally an
ced7ef1f8c0df1805da0e87dbc5a1b6282910573nd exclamation mark.</para>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <para>The following line types are understood:</para>
4a31db3c3a0202003c1b9f87affa7cc143e120e5sf <variablelist>
4a31db3c3a0202003c1b9f87affa7cc143e120e5sf <varlistentry>
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick <listitem><para>Create a file if it does not exist yet. If
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick the argument parameter is given, it will be written to the
8a6d5edcb07aeccca7afba02a17dd6904d6b206ctrawick </varlistentry>
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive <varlistentry>
92510838f2eb125726e15c5eb4f7a23c7a0396e4slive <listitem><para>Create or truncate a file. If the argument
f0fa55ff14fa0bf8fd72d989f6625de6dc3260c8igalic parameter is given, it will be written to the file. Does not follow symlinks.</para>
f0fa55ff14fa0bf8fd72d989f6625de6dc3260c8igalic </listitem>
f0fa55ff14fa0bf8fd72d989f6625de6dc3260c8igalic </varlistentry>
f0fa55ff14fa0bf8fd72d989f6625de6dc3260c8igalic <varlistentry>
f0fa55ff14fa0bf8fd72d989f6625de6dc3260c8igalic <listitem><para>Write the argument parameter to a file, if
f0fa55ff14fa0bf8fd72d989f6625de6dc3260c8igalic the file exists. Lines of this type accept shell-style
f0fa55ff14fa0bf8fd72d989f6625de6dc3260c8igalic globs in place of normal path names. The argument parameter
06ba4a61654b3763ad65f52283832ebf058fdf1cslive will be written without a trailing newline. C-style
e8d485701957d5c6de870111c112e168a894d49and backslash escapes are interpreted. Follows
654d8eb036bedc99e90e11910ee02d3421417697rbowen </varlistentry>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive <varlistentry>
9bcfc3697a91b5215893a7d0206865b13fc72148nd <listitem><para>Create a directory if it does not exist yet.
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive </varlistentry>
4a31db3c3a0202003c1b9f87affa7cc143e120e5sf <varlistentry>
9b6a3a558cc90ffdaa0b50bd02546ffec424ded7slive <listitem><para>Create or empty a directory.</para></listitem>
709e3a21ba73b8433462959cd56c773454b34441trawick </varlistentry>
709e3a21ba73b8433462959cd56c773454b34441trawick <varlistentry>
709e3a21ba73b8433462959cd56c773454b34441trawick <listitem><para>Create a subvolume if the path does not
709e3a21ba73b8433462959cd56c773454b34441trawick exist yet and the file system supports this
709e3a21ba73b8433462959cd56c773454b34441trawick (btrfs). Otherwise create a normal directory, in the same
5a58787efeb02a1c3f06569d019ad81fd2efa06end </varlistentry>
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd <varlistentry>
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung <listitem><para>Create a named pipe (FIFO) if it does not
727872d18412fc021f03969b8641810d8896820bhumbedooh exist yet. If suffixed with <varname>+</varname> and a file
0d0ba3a410038e179b695446bb149cce6264e0abnd already exists where the pipe is to be created, it will be
727872d18412fc021f03969b8641810d8896820bhumbedooh removed and be replaced by the pipe.</para></listitem>
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedooh </varlistentry>
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedooh <varlistentry>
ac082aefa89416cbdc9a1836eaf3bed9698201c8humbedooh already exists where the symlink is to be created, it will
0d0ba3a410038e179b695446bb149cce6264e0abnd be removed and be replaced by the symlink. If the argument
0d0ba3a410038e179b695446bb149cce6264e0abnd is omitted, symlinks to files with the same name residing in
0d0ba3a410038e179b695446bb149cce6264e0abnd the directory <filename>/usr/share/factory/</filename> are
0d0ba3a410038e179b695446bb149cce6264e0abnd </varlistentry>
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh <varlistentry>
0d0ba3a410038e179b695446bb149cce6264e0abnd <listitem><para>Create a character device node if it does
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd not exist yet. If suffixed with <varname>+</varname> and a
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd file already exists where the device node is to be created,
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd it will be removed and be replaced by the device node. It is
5a58787efeb02a1c3f06569d019ad81fd2efa06end recommended to suffix this entry with an exclamation mark to
at any time, e.g. on package upgrades.
<entry>The machine ID of the running system, formatted as string. See <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry> for more information.</entry>
<entry>The boot ID of the running system, formatted as string. See <citerefentry><refentrytitle>random</refentrytitle><manvolnum>4</manvolnum></citerefentry> for more information.</entry>
<para><command>abrt</command> needs a directory created at boot with specific mode and ownership and its content should be preserved.</para>
<citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry project='man-pages'><refentrytitle>attr</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry project='man-pages'><refentrytitle>getfattr</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry project='man-pages'><refentrytitle>setfattr</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry project='man-pages'><refentrytitle>setfacl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry project='man-pages'><refentrytitle>getfacl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,