1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
.. -*- mode: rst -*-
.. _server-info:
========
info.xml
========
Various file properties for entries served by most generator plugins,
including :ref:`server-plugins-generators-cfg`,
:ref:`server-plugins-generators-sslca`, and
:ref:`server-plugins-generators-sshbase`, are controlled through the
use of ``info.xml`` files.
By default, these plugins are set to write files to the filesystem
with owner **root**, group **root**, and mode **644** (read and write
for owner, read only for group and other). These options, and a few
others, can be overridden through use of ``info.xml`` files. Each
config file directory can have a ``info.xml`` file if needed.
.. xml:schema:: info.xsd
:linktotype:
:inlinetypes: InfoType
:noautodep: ACLType
A sample ``info.xml`` file for CGI script on a web server might look
like:
.. code-block:: xml
<FileInfo>
<Info owner="www" group="www" mode="0755"/>
</FileInfo>
A more complex example for a template that generates both
``bcfg2.conf`` and ``bcfg2-web.conf`` might look like this:
.. code-block:: xml
<FileInfo>
<Path name="/etc/bcfg2-web.conf">
<Info owner="root" group="apache" mode="0640"/>
</Path>
<Path name="/etc/bcfg2-web.conf" negate="true">
<Group name="bcfg2-server">
<Info owner="bcfg2" group="bcfg2" mode="0600"/>
</Group>
<Group name="bcfg2-server" negate="true">
<Info owner="root" group="root" mode="0600"/>
</Group>
</Path>
</FileInfo>
See :ref:`server-selinux` for more information on the ``secontext``
attribute and managing SELinux in general.
:info and info files
====================
.. deprecated:: 1.3.0
Historically, Bcfg2 also accepted the use of ``:info`` and ``info``
files, which function the same as ``info.xml``, but are not XML. They
lack the ability to specify different permissions based on client,
group, or path, and cannot be used to specify ACLs, either.
An example ``:info`` or ``info`` file would look like::
owner: www
group: www
mode: 0755
All attributes allowed on the ``<Info>`` tag of an ``info.xml`` file
can be used in an ``:info`` or ``info`` file.
You should not use more than one ``:info``, ``info``, or ``info.xml``
file for a single entry.
|