Remove remaining host.conf(5) traces.
[dragonfly.git] / share / man / man5 / devices.conf.5
1 .\" Copyright (c) 2005 Joerg Anslik <joerg@anslik.de>
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $DragonFly: src/share/man/man5/devices.conf.5,v 1.4 2008/09/06 10:23:39 thomas Exp $
26 .\"
27 .\" Note: The date here should be updated whenever a non-trivial
28 .\" change is made to the manual page.
29 .Dd March 18, 2005
30 .Dt DEVICES.CONF 5
31 .Os
32 .Sh NAME
33 .Nm devices.conf
34 .Nd override ownership and permissions for device nodes
35 .Sh SYNOPSIS
36 .Pa /etc/devices.conf
37 .Sh DESCRIPTION
38 The
39 .Nm
40 file is used by the
41 .Xr MAKEDEV 8
42 shell script.
43 Normally,
44 .Xr MAKEDEV 8
45 creates any special
46 file (device node) with reasonable ownership and permissions. To override these default
47 settings, you can put corresponding entries in your
48 .Pa devices.conf
49 file, so
50 .Xr MAKEDEV 8
51 will use these when it creates the special file.
52 .Pp
53 This feature comes in handy if you're using (e.g.) tape backup software like
54 .Pa bacula
55 in conjunction with a tape autochanger device. In this case, the
56 .Dq bacula-sd
57 storage daemon needs read/write access to
58 .Pa /dev/pass? ,
59 which is not granted by default
60 when
61 .Xr MAKEDEV 8
62 creates the
63 .Pa pass?
64 device node.
65 .Pp
66 So, instead of manually changing the permissions of /dev/pass? after each
67 .Dq make upgrade ,
68 you can simply put a local override entry into
69 .Pa devices.conf ,
70 so the device node will have the new permissions the next time
71 .Xr MAKEDEV 8
72 creates it.
73 .Sh FILE FORMAT
74 The contents of the
75 .Nm
76 file is plain ASCII and can be modified with the
77 text editor of your choice.
78 Lines with a
79 .Ql #
80 in the first column are comments and are ignored, which also holds true
81 for blank lines.
82 .Pp
83 A configuration line consists of up to four fields separated
84 by whitespace. The first three fields are mandatory, and contain the name of the device
85 node to be overridden, the ownership in
86 .Dq owner:group
87 format and the new file permissions. The fourth field is optional and
88 reserved for comments (or whatever).
89 .Pp
90 Due to the huge number of device nodes that
91 .Xr MAKEDEV 8
92 can create,
93 the first field (the device node name) may contain the
94 .Ql *
95 wildcard character, if the new ownership/permissions should apply to an entire
96 device family (see
97 .Sx EXAMPLES ) .
98 .Sh FILES
99 .Bl -tag -width ".Pa /etc/devices.conf"
100 .It Pa /etc/devices.conf
101 The local device permissions override file
102 .El
103 .Sh EXAMPLES
104 The following is an example of how to set up local overrides for some
105 device nodes.
106 .Bd -literal
107 # Grant read and write permission on /dev/pass0 to the bacula-sd,
108 # which belongs to the operator group.
109 pass0   root:operator   660
110
111 # Change ownership and permissions for the entire ad0 device family
112 ad0*    root:man        640
113
114 # Grant read and write access to sa* control nodes to everyone
115 sa*.ctl root:wheel      666
116
117 # Change ownership and permissions for device node "4" in /dev/fd
118 fd/4    ihate:floppies  000
119
120 # Grant mommy write access to my fridge
121 fridge  mommy:supplies  640     # Will be ignored by MAKEDEV(8)...
122 .Ed
123 .Sh SEE ALSO
124 .Xr MAKEDEV 8