2N/A<?
xml version="1.0"?>
2N/A This file is part of systemd. 2N/A Copyright 2010 Brandon Philips 2N/A systemd is free software; you can redistribute it and/or modify it 2N/A under the terms of the GNU General Public License as published by 2N/A the Free Software Foundation; either version 2 of the License, or 2N/A (at your option) any later version. 2N/A systemd is distributed in the hope that it will be useful, but 2N/A WITHOUT ANY WARRANTY; without even the implied warranty of 2N/A MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 2N/A General Public License for more details. 2N/A You should have received a copy of the GNU General Public License 2N/A <
productname>systemd</
productname>
2N/A <
contrib>Documentation</
contrib>
2N/A <
firstname>Brandon</
firstname>
59N/A <
surname>Philips</
surname>
59N/A <
email>brandon@ifup.org</
email>
2N/A <
manvolnum>5</
manvolnum>
26N/A <
refpurpose>Configuration for creation, deletion and
26N/A cleaning of volatile and temporary files</
refpurpose>
26N/A <
title>Description</
title>
151N/A <
para><
command>systemd-tmpfiles</
command> uses the
206N/A configuration files from the above directories to describe the
26N/A creation, cleaning and removal of volatile and
26N/A temporary files and directories which usually reside
26N/A in directories such as <
filename>/run</
filename>
26N/A or <
filename>/tmp</
filename>.</
para>
2N/A <
title>Configuration Format</
title>
26N/A <
para>Each configuration file is named in the style of
26N/A <
filename><program>.conf</
filename>.
26N/A Files in <
filename>/etc/</
filename> overwrite
26N/A files with the same name in <
filename>/
usr/
lib/</
filename>.
26N/A Files in <
filename>/run</
filename> overwrite files with
26N/A the same name in <
filename>/etc/</
filename> and
26N/A <
filename>/
usr/
lib/</
filename>. Packages should install their
586N/A configuration files in <
filename>/
usr/
lib/</
filename>, files
26N/A in <
filename>/etc/</
filename> are reserved for the local
93N/A administration, which possibly decides to overwrite the
166N/A configurations installed from packages. All files are sorted
26N/A by filename in alphabetical order, regardless in which of the
379N/A directories they reside, to ensure that a specific
379N/A configuration file takes precedence over another file with
2N/A an alphabetically later name.</
para>
26N/A <
para>The configuration format is one line per path
181N/A containing action, mode, ownership and age
99N/A <
programlisting>Type Path Mode UID GID Age
26N/A <
title>Type</
title>
2N/A <
term><
varname>f</
varname></
term>
26N/A <
listitem><
para>Create a file if it doesn't exist yet</
para></
listitem>
2N/A <
term><
varname>F</
varname></
term>
255N/A <
listitem><
para>Create or truncate a file</
para></
listitem>
26N/A <
term><
varname>d</
varname></
term>
38N/A <
listitem><
para>Create a directory if it doesn't exist yet</
para></
listitem>
197N/A <
term><
varname>D</
varname></
term>
197N/A <
listitem><
para>Create or empty a directory</
para></
listitem>
26N/A <
term><
varname>p</
varname></
term>
46N/A <
listitem><
para>Create a named pipe (FIFO) if it doesn't exist yet</
para></
listitem>
64N/A <
term><
varname>x</
varname></
term>
26N/A <
listitem><
para>Ignore a path
46N/A during cleaning. Use this type
46N/A to exclude paths from clean-up
46N/A as controlled with the Age
2N/A parameter. Note that lines of
46N/A this type do not influence the
369N/A effect of r or R lines. Lines
53N/A of this type accept
46N/A shell-style globs in place of
26N/A names.</
para></
listitem>
181N/A <
term><
varname>r</
varname></
term>
181N/A <
listitem><
para>Remove a file
181N/A exists. This may not be used
76N/A directories, use R for
99N/A that. Lines of this type
181N/A accept shell-style globs in
99N/A place of normal path
26N/A names.</
para></
listitem>
145N/A <
term><
varname>R</
varname></
term>
145N/A <
listitem><
para>Recursively
145N/A remove a path and all its
145N/A subdirectories (if it is a
145N/A directory). Lines of this type
117N/A accept shell-style globs in
84N/A place of normal path
145N/A names.</
para></
listitem>
46N/A <
term><
varname>Z</
varname></
term>
99N/A <
listitem><
para>Recursively set
99N/A ownership, access mode and relabel
196N/A security context of a path and
185N/A all its subdirectories (if it is a
99N/A directory). Lines of this type accept
46N/A shell-style globs in place of normal
2N/A path names.</
para></
listitem>
32N/A <
title>Mode</
title>
32N/A <
para>The file access mode to use when
32N/A creating this file or directory. If omitted or
32N/A when set to - the default is used: 0755 for
32N/A directories, 0644 for files. For Z lines
32N/A if omitted or when set to - the file access mode will
32N/A not be modified. This parameter is ignored for x, r, R
38N/A <
title>UID, GID</
title>
38N/A <
para>The user and group to use for this file
38N/A or directory. This may either be a numeric
38N/A omitted or when set to - the default 0 (root)
145N/A is used. For Z lines when omitted or when set to -
38N/A the file ownership will not be modified.
38N/A These parameters are ignored for x, r, R lines.</
para>
26N/A <
para>The date field, when set, is used to
26N/A decide what files to delete when cleaning. If
26N/A a file or directory is older than the current
26N/A time minus the age field it is deleted. The
26N/A field format is a series of integers each
32N/A followed by one of the following
32N/A postfixes for the respective time units:</
para>
32N/A <
term><
varname>s</
varname></
term>
32N/A <
term><
varname>min</
varname></
term>
32N/A <
term><
varname>h</
varname></
term>
38N/A <
term><
varname>d</
varname></
term>
38N/A <
term><
varname>w</
varname></
term>
38N/A <
term><
varname>ms</
varname></
term>
32N/A <
term><
varname>m</
varname></
term>
<
term><
varname>us</
varname></
term></
varlistentry>
<
para>If multiple integers and units are specified the time
values are summed up.</
para>
<
para>The age field only applies to lines starting with
d, D and x. If omitted or set to - no automatic clean-up
<
para><
command>screen</
command> needs two directories created at boot with specific modes and ownership.</
para>
<
citerefentry><
refentrytitle>systemd</
refentrytitle><
manvolnum>1</
manvolnum></
citerefentry>,
<
citerefentry><
refentrytitle>systemd-tmpfiles</
refentrytitle><
manvolnum>8</
manvolnum></
citerefentry>