Remove ports specific periodic script & documentation.
[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.1 2005/03/22 00:40:53 dillon 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 MAKEDEV(8) shell script. Normally, MAKEDEV(8) creates any special
41 file (device node) with reasonable ownership and permissions. To override these default
42 settings, you can put corresponding entries in your
43 .Pa devices.conf
44 file, so MAKEDEV(8) will use these when it creates the special file.
45 .Pp
46 This feature comes in handy if you're using (e.g.) tape backup software like
47 .Pa bacula
48 in conjunction with a tape autochanger device. In this case, the
49 .Dq bacula-sd
50 storage daemon needs read/write access to /dev/pass?, which is not granted by default
51 when MAKEDEV(8) creates the pass? device node.
52 .Pp
53 So, instead of manually changing the permissions of /dev/pass? after each
54 .Dq make upgrade ,
55 you can simply put a local override entry into
56 .Pa devices.conf ,
57 so the device node will have the new permissions the next time MAKEDEV(8)
58 creates it.
59 .Sh FILE FORMAT
60 The contents of the
61 .Nm
62 file is plain ASCII and can be modified with the
63 text editor of your choice.
64 Lines with a
65 .Ql #
66 in the first column are comments and are ignored, which also holds true
67 for blank lines.
68 .Pp
69 A configuration line consists of up to four fields separated
70 by whitespace. The first three fields are mandatory, and contain the name of the device
71 node to be overridden, the ownership in
72 .Dq owner:group
73 format and the new file permissions. The fourth field is optional and
74 reserved for comments (or whatever).
75 .Pp
76 Due to the huge number of device nodes that MAKEDEV(8) can create,
77 the first field (the device node name) may contain the
78 .Ql *
79 wildcard character, if the new ownership/permissions should apply to an entire
80 device family (see EXAMPLES).
81 .Sh EXAMPLES
82 The following is an example of how to set up local overrides for some
83 device nodes.
84 .Bd -literal
85 # Grant read and write permission on /dev/pass0 to the bacula-sd,
86 # which belongs to the operator group.
87 pass0   root:operator   660
88
89 # Change ownership and permissions for the entire ad0 device family
90 ad0*    root:man        640
91
92 # Grant read and write access to sa* control nodes to everyone
93 sa*.ctl root:wheel      666
94
95 # Change ownership and permissions for device node "4" in /dev/fd
96 fd/4    ihate:floppies  000
97
98 # Grant mommy write access to my fridge
99 fridge  mommy:supplies  640     # Will be ignored by MAKEDEV(8)...
100 .Ed
101 .Sh FILES
102 .Bl -tag -width ".Pa devices.conf"
103 .It Pa devices.conf
104 The local device permissions override file lives in
105 .Pa /etc .
106 .El
107 .Sh SEE ALSO
108 .Xr MAKEDEV 8