tmpfiles.d.xml revision 818156512411835a4a7f070e6fec3d7b80e1f629
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen This file is part of systemd.
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen Copyright 2010 Brandon Philips
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen systemd is free software; you can redistribute it and/or modify it
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen under the terms of the GNU Lesser General Public License as published by
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen the Free Software Foundation; either version 2.1 of the License, or
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen (at your option) any later version.
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen systemd is distributed in the hope that it will be useful, but
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen WITHOUT ANY WARRANTY; without even the implied warranty of
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen Lesser General Public License for more details.
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen You should have received a copy of the GNU Lesser General Public License
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen along with systemd; If not, see <http://www.gnu.org/licenses/>.
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <productname>systemd</productname>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <contrib>Documentation</contrib>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <firstname>Brandon</firstname>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <email>brandon@ifup.org</email>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <refentrytitle>tmpfiles.d</refentrytitle>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <refname>tmpfiles.d</refname>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <refpurpose>Configuration for creation, deletion and
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen cleaning of volatile and temporary files</refpurpose>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <para><filename>/etc/tmpfiles.d/*.conf</filename></para>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <para><filename>/run/tmpfiles.d/*.conf</filename></para>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <para><filename>/usr/lib/tmpfiles.d/*.conf</filename></para>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen </refsynopsisdiv>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <para><command>systemd-tmpfiles</command> uses the
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen configuration files from the above directories to describe the
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen creation, cleaning and removal of volatile and
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen temporary files and directories which usually reside
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen in directories such as <filename>/run</filename>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen or <filename>/tmp</filename>.</para>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <title>Configuration Format</title>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <para>Each configuration file shall be named in the
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <filename><replaceable>package</replaceable>.conf</filename>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <filename><replaceable>package</replaceable>-<replaceable>part</replaceable>.conf</filename>.
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen The second variant should be used when it is desirable
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen to make it easy to override just this part of
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen configuration.</para>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <para>Files in <filename>/etc/tmpfiles.d</filename>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen override files with the same name in
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <filename>/usr/lib/tmpfiles.d</filename> and
260ad50f5b4a9795032e3119c64f838a2d03370dThomas Hindoe Paaboel Andersen <filename>/run/tmpfiles.d</filename>. Files in
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <filename>/run/tmpfiles.d</filename> override files
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen with the same name in
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <filename>/usr/lib/tmpfiles.d</filename>. Packages
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen should install their configuration files in
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <filename>/usr/lib/tmpfiles.d</filename>. Files in
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <filename>/etc/tmpfiles.d</filename> are reserved for
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen the local administrator, who may use this logic to
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen override the configuration files installed by vendor
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen packages. All configuration files are sorted by their
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen filename in lexicographic order, regardless of which
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen of the directories they reside in. If multiple files
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen specify the same path, the entry in the file with the
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen lexicographically earliest name will be applied, all
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen all other conflicting entries logged as errors.</para>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <para>If the administrator wants to disable a
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen configuration file supplied by the vendor, the
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen recommended way is to place a symlink to
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <filename>/dev/null</filename> in
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <filename>/etc/tmpfiles.d/</filename> bearing the
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen same filename.</para>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <para>The configuration format is one line per path
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen containing type, path, mode, ownership, age, and argument
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <programlisting>#Type Path Mode UID GID Age Argument
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersend /run/user 0755 root root 10d -
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel AndersenL /tmp/foobar - - - - /dev/null</programlisting>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <para>The type consists of a single letter and
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen optionally an exclamation mark.</para>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <para>The following line types are understood:</para>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>f</varname></term>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <listitem><para>Create a file if it does not exist yet. If the argument parameter is given, it will be written to the file.</para></listitem>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>F</varname></term>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <listitem><para>Create or truncate a file. If the argument parameter is given, it will be written to the file.</para></listitem>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>w</varname></term>
260ad50f5b4a9795032e3119c64f838a2d03370dThomas Hindoe Paaboel Andersen <listitem><para>Write the argument parameter to a file, if the file exists.
260ad50f5b4a9795032e3119c64f838a2d03370dThomas Hindoe Paaboel Andersen Lines of this type accept shell-style globs in place of normal path
260ad50f5b4a9795032e3119c64f838a2d03370dThomas Hindoe Paaboel Andersen names. The argument parameter will be written without a trailing
260ad50f5b4a9795032e3119c64f838a2d03370dThomas Hindoe Paaboel Andersen newline. C-style backslash escapes are interpreted.</para></listitem>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>d</varname></term>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <listitem><para>Create a directory if it does not exist yet.</para></listitem>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>D</varname></term>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <listitem><para>Create or empty a directory.</para></listitem>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>p</varname></term>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <listitem><para>Create a named pipe (FIFO) if it does not exist yet.</para></listitem>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>L</varname></term>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <listitem><para>Create a symlink if it does not exist yet.</para></listitem>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>c</varname></term>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <listitem><para>Create a character device node if it does not exist yet.</para></listitem>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>b</varname></term>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <listitem><para>Create a block device node if it does not exist yet.</para></listitem>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>m</varname></term>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen specified file path exists,
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen adjust its access mode, group
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen and user to the specified
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen values and reset the SELinux
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen label. If it does not exist, do
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>x</varname></term>
d171ed1c50ba64928b7fb30ee2ae729fdfe0826bThomas Hindoe Paaboel Andersen <listitem><para>Ignore a path
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen during cleaning. Use this type
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen to exclude paths from clean-up
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen as controlled with the Age
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen parameter. Note that lines of
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen this type do not influence the
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen effect of <varname>r</varname>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen or <varname>R</varname> lines.
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen Lines of this type accept
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen shell-style globs in place of
260ad50f5b4a9795032e3119c64f838a2d03370dThomas Hindoe Paaboel Andersen normal path names.
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>X</varname></term>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <listitem><para>Ignore a path
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen during cleaning. Use this type
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen to exclude paths from clean-up
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen as controlled with the Age
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen parameter. Unlike
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen parameter will not exclude the
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen content if path is a
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen directory, but only directory
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen itself. Note that lines of
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen this type do not influence the
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen effect of <varname>r</varname>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen or <varname>R</varname> lines.
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen Lines of this type accept
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen shell-style globs in place of
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen normal path names.
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>r</varname></term>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <listitem><para>Remove a file
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen or directory if it exists.
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen This may not be used to remove
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen non-empty directories, use
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <varname>R</varname> for that.
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen Lines of this type accept
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen shell-style globs in place of
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>R</varname></term>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen remove a path and all its
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen subdirectories (if it is a
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen directory). Lines of this type
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen accept shell-style globs in
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen place of normal path
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>z</varname></term>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen SELinux security context label
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen and set ownership and access
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen mode of a file or directory if
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen it exists. Lines of this type
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen accept shell-style globs in
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen place of normal path names.
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>Z</varname></term>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen restore SELinux security
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen context label and set
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen ownership and access mode of a
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen subdirectories (if it is a
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen directory). Lines of this type
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen accept shell-style globs in
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen place of normal path
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <para>If the exclamation mark is used, this
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen line is only safe of execute during boot, and
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen can break a running system. Lines without the
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen exclamation mark are presumed to be safe to
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen execute at any time, e.g. on package upgrades.
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <command>systemd-tmpfiles</command> will
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen execute line with an exclamation mark only if
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen option <option>--boot</option> is given.
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <para>For example:
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen# Make sure these are created by default so that nobody else can
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersend /tmp/.X11-unix 1777 root root 10d
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen# Unlink the X11 lock files
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen </programlisting>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen The second line in contrast to the first one
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen would break a running system, and will only be
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen executed with <option>--boot</option>.</para>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <para>The file system path specification supports simple specifier
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen expansion. The following expansions are
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen understood:</para>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <title>Specifiers available</title>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <tgroup cols='3' align='left' colsep='1' rowsep='1'>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <entry><literal>%m</literal></entry>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <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>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <entry><literal>%b</literal></entry>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <entry>The boot ID of the running system, formatted as string. See <citerefentry><refentrytitle>random</refentrytitle><manvolnum>4</manvolnum></citerefentry> for more information.</entry>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <entry><literal>%H</literal></entry>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <entry>The hostname of the running system.</entry>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <entry><literal>%v</literal></entry>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <entry>Kernel release</entry>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <entry>Identical to <command>uname -r</command> output.</entry>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <entry><literal>%%</literal></entry>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <entry>Single percent sign.</entry>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <para>The file access mode to use when
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen creating this file or directory. If omitted or
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen when set to -, the default is used: 0755 for
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen directories, 0644 for all other file objects.
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen For <varname>z</varname>, <varname>Z</varname>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen lines, if omitted or when set to
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <literal>-</literal>, the file access mode
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen will not be modified. This parameter is
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen ignored for <varname>x</varname>,
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <varname>r</varname>, <varname>R</varname>,
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <varname>L</varname> lines.</para>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <para>The user and group to use for this file
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen or directory. This may either be a numeric
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen user/group ID or a user or group name. If
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen omitted or when set to <literal>-</literal>,
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen the default 0 (root) is used. For
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <varname>z</varname>, <varname>Z</varname>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen lines, when omitted or when set to -, the file
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen ownership will not be modified. These
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen parameters are ignored for
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <varname>x</varname>, <varname>r</varname>,
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <varname>R</varname>, <varname>L</varname>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <para>The date field, when set, is used to
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen decide what files to delete when cleaning. If
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen a file or directory is older than the current
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen time minus the age field, it is deleted. The
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen field format is a series of integers each
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen followed by one of the following
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen postfixes for the respective time units:</para>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>s</varname></term>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>min</varname></term>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>h</varname></term>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>d</varname></term>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>w</varname></term>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>ms</varname></term>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>m</varname></term>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <term><varname>us</varname></term></varlistentry>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <para>If multiple integers and units are specified, the time
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen values are summed up. If an integer is given without a unit,
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <para>When the age is set to zero, the files are cleaned
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen unconditionally.</para>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <para>The age field only applies to lines
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen starting with <varname>d</varname>,
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <varname>x</varname>. If omitted or set to
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <literal>-</literal>, no automatic clean-up is
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <para>If the age field starts with a tilde
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen character <literal>~</literal>, the clean-up
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen is only applied to files and directories one
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen level inside the directory specified, but not
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen the files and directories immediately inside
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <para>For <varname>L</varname> lines
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen determines the destination path of the
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen symlink. For <varname>c</varname>,
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <varname>b</varname> determines the
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen major/minor of the device node, with major and
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen minor formatted as integers, separated by
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <varname>f</varname>, <varname>F</varname>,
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen and <varname>w</varname> may be used to
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen specify a short string that is written to the
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen file, suffixed by a newline. Ignored for all
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen other lines.</para>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <title>/etc/tmpfiles.d/screen.conf example</title>
a2a5291b3f5ab6ed4c92f51d0fd10a03047380d8Zbigniew Jędrzejewski-Szmek <para><command>screen</command> needs two directories created at boot with specific modes and ownership.</para>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <programlisting>d /var/run/screens 1777 root root 10d
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersend /var/run/uscreens 0755 root root 10d12h</programlisting>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <title>/etc/tmpfiles.d/abrt.conf example</title>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <para><command>abrt</command> needs a directory created at boot with specific mode and ownership and its content should be preserved.</para>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <programlisting>d /var/tmp/abrt 0755 abrt abrt
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersenx /var/tmp/abrt/*</programlisting>
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
95ed3294c632f5606327149f10cef1eb34422862Thomas Hindoe Paaboel Andersen <citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>