info.xmlΒΆ
Various file properties for entries served by most generator plugins,
including Cfg and
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.
A sample info.xml
file for CGI script on a web server might look
like:
<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:
<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 SELinux for more information on the secontext
attribute and managing SELinux in general.