.\" Copyright (c) 2005 Joerg Anslik .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $DragonFly: src/share/man/man5/devices.conf.5,v 1.2 2006/02/17 19:37:10 swildner Exp $ .\" .\" Note: The date here should be updated whenever a non-trivial .\" change is made to the manual page. .Dd March 18, 2005 .Dt DEVICES.CONF 5 .Os .Sh NAME .Nm devices.conf .Nd override ownership and permissions for device nodes .Sh SYNOPSIS .Pa /etc/devices.conf .Sh DESCRIPTION The .Nm file is used by the MAKEDEV(8) shell script. Normally, MAKEDEV(8) creates any special file (device node) with reasonable ownership and permissions. To override these default settings, you can put corresponding entries in your .Pa devices.conf file, so MAKEDEV(8) will use these when it creates the special file. .Pp This feature comes in handy if you're using (e.g.) tape backup software like .Pa bacula in conjunction with a tape autochanger device. In this case, the .Dq bacula-sd storage daemon needs read/write access to /dev/pass?, which is not granted by default when MAKEDEV(8) creates the pass? device node. .Pp So, instead of manually changing the permissions of /dev/pass? after each .Dq make upgrade , you can simply put a local override entry into .Pa devices.conf , so the device node will have the new permissions the next time MAKEDEV(8) creates it. .Sh FILE FORMAT The contents of the .Nm file is plain ASCII and can be modified with the text editor of your choice. Lines with a .Ql # in the first column are comments and are ignored, which also holds true for blank lines. .Pp A configuration line consists of up to four fields separated by whitespace. The first three fields are mandatory, and contain the name of the device node to be overridden, the ownership in .Dq owner:group format and the new file permissions. The fourth field is optional and reserved for comments (or whatever). .Pp Due to the huge number of device nodes that MAKEDEV(8) can create, the first field (the device node name) may contain the .Ql * wildcard character, if the new ownership/permissions should apply to an entire device family (see EXAMPLES). .Sh FILES .Bl -tag -width ".Pa devices.conf" .It Pa devices.conf The local device permissions override file lives in .Pa /etc . .El .Sh EXAMPLES The following is an example of how to set up local overrides for some device nodes. .Bd -literal # Grant read and write permission on /dev/pass0 to the bacula-sd, # which belongs to the operator group. pass0 root:operator 660 # Change ownership and permissions for the entire ad0 device family ad0* root:man 640 # Grant read and write access to sa* control nodes to everyone sa*.ctl root:wheel 666 # Change ownership and permissions for device node "4" in /dev/fd fd/4 ihate:floppies 000 # Grant mommy write access to my fridge fridge mommy:supplies 640 # Will be ignored by MAKEDEV(8)... .Ed .Sh SEE ALSO .Xr MAKEDEV 8