xref: /dragonfly/usr.sbin/edquota/edquota.8 (revision 0bb9290e)
1.\" Copyright (c) 1983, 1990, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" Robert Elz at The University of Melbourne.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\" 3. All advertising materials mentioning features or use of this software
16.\"    must display the following acknowledgement:
17.\"	This product includes software developed by the University of
18.\"	California, Berkeley and its contributors.
19.\" 4. Neither the name of the University nor the names of its contributors
20.\"    may be used to endorse or promote products derived from this software
21.\"    without specific prior written permission.
22.\"
23.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33.\" SUCH DAMAGE.
34.\"
35.\"	@(#)edquota.8	8.1 (Berkeley) 6/6/93
36.\" $FreeBSD: src/usr.sbin/edquota/edquota.8,v 1.9.2.3 2002/10/11 14:25:39 sobomax Exp $
37.\" $DragonFly: src/usr.sbin/edquota/edquota.8,v 1.4 2006/05/26 19:39:40 swildner Exp $
38.\"
39.Dd June 6, 1993
40.Dt EDQUOTA 8
41.Os
42.Sh NAME
43.Nm edquota
44.Nd edit user quotas
45.Sh SYNOPSIS
46.Nm
47.Op Fl u
48.Op Fl f Ar fspath
49.Op Fl p Ar proto-username
50.Ar username ...
51.Nm
52.Op Fl u
53.Fl e Ar fspath Ns Op : Ns Ar bslim Ns Op : Ns Ar bhlim Ns Op : Ns Ar islim Ns Op : Ns Ar ihlim
54.Op Fl e Ar ...
55.Ar username ...
56.Nm
57.Fl g
58.Op Fl f Ar fspath
59.Op Fl p Ar proto-groupname
60.Ar groupname ...
61.Nm
62.Fl g
63.Fl e Ar fspath Ns Op : Ns Ar bslim Ns Op : Ns Ar bhlim Ns Op : Ns Ar islim Ns Op : Ns Ar ihlim
64.Op Fl e Ar ...
65.Ar groupname ...
66.Nm
67.Fl t
68.Op Fl u
69.Op Fl f Ar fspath
70.Nm
71.Fl t
72.Fl g
73.Op Fl f Ar fspath
74.Sh DESCRIPTION
75.Nm Edquota
76is a quota editor.
77By default, or if the
78.Fl u
79flag is specified,
80one or more users may be specified on the command line.
81For each user a temporary file is created
82with an
83.Tn ASCII
84representation of the current
85disk quotas for that user.
86The list of filesystems with user quotas is determined from
87.Pa /etc/fstab .
88An editor is invoked on the
89.Tn ASCII
90file.
91The editor invoked is
92.Xr vi 1
93unless the environment variable
94.Ev EDITOR
95specifies otherwise.
96.Pp
97The quotas may then be modified, new quotas added, etc.
98Setting a quota to zero indicates that no quota should be imposed.
99Setting a hard limit to one indicates that no allocations should
100be permitted.
101Setting a soft limit to one with a hard limit of zero
102indicates that allocations should be permitted only on
103a temporary basis (see
104.Fl t
105below).
106The current usage information in the file is for informational purposes;
107only the hard and soft limits can be changed.
108.Pp
109On leaving the editor,
110.Nm
111reads the temporary file and modifies the binary
112quota files to reflect the changes made.
113.Pp
114If the
115.Fl p
116option is specified,
117.Nm
118will duplicate the quotas of the prototypical user
119specified for each user specified.
120This is the normal mechanism used to
121initialize quotas for groups of users.
122If the user given to assign quotas to is a numerical uid
123range (e.g. 1000-2000), then
124.Nm
125will duplicate the quotas of the prototypical user
126for each uid in the range specified.  This allows
127for easy setup of default quotas for a group of users.
128The uids in question do not have to be currently assigned in
129.Pa /etc/passwd .
130.Pp
131If one or more
132.Fl e Ar fspath Ns Op : Ns Ar bslim Ns Op : Ns Ar bhlim Ns Op : Ns Ar islim Ns Op : Ns Ar ihlim
133options are specified,
134.Nm
135will non-interactively set quotas defined by
136.Ar bslim ,
137.Ar bhlim ,
138.Ar islim and
139.Ar ihlim
140on each particular filesystem referenced by
141.Ar fspath .
142Here
143.Ar bslim
144is soft limit on number of blocks,
145.Ar bslim
146is hard limit on number of blocks,
147.Ar islim
148is soft limit on number of files and
149.Ar ihlim
150is hard limit on number of files.
151If any of the
152.Ar bslim ,
153.Ar bhlim ,
154.Ar islim and
155.Ar ihlim
156values are omitted, it is assumed to be zero, therefore
157indicating that no quota should be imposed.
158.Pp
159If invoked with the
160.Fl f
161option,
162.Nm
163will read and modify quotas on the filesystem specified by
164.Ar fspath
165only.
166The
167.Ar fspath
168argument may be either a special device
169or a filesystem mount point.
170The primary purpose of this option is to set the scope for the
171.Fl p
172option, which would overwrite quota records on every
173filesystem with quotas otherwise.
174.Pp
175If the
176.Fl g
177flag is specified,
178.Nm
179is invoked to edit the quotas of
180one or more groups specified on the command line.
181The
182.Fl p
183flag can be specified in conjunction with
184the
185.Fl g
186flag to specify a prototypical group
187to be duplicated among the listed set of groups.
188Similarly,
189.Fl e
190flag can be specified in conjunction with
191the
192.Fl g
193flag to non-interactively set-up quotas on the listed set
194of groups.
195.Pp
196Users are permitted to exceed their soft limits
197for a grace period that may be specified per filesystem.
198Once the grace period has expired,
199the soft limit is enforced as a hard limit.
200The default grace period for a filesystem is specified in
201.In vfs/ufs/quota.h .
202The
203.Fl t
204flag can be used to change the grace period.
205By default, or when invoked with the
206.Fl u
207flag,
208the grace period is set for all the filesystems with user
209quotas specified in
210.Pa /etc/fstab .
211When invoked with the
212.Fl g
213flag the grace period is
214set for all the filesystems with group quotas specified in
215.Pa /etc/fstab .
216The grace period may be specified in days, hours, minutes, or seconds.
217Setting a grace period to zero indicates that the default
218grace period should be imposed.
219Setting a grace period to one second indicates that no
220grace period should be granted.
221.Pp
222Only the super-user may edit quotas.
223.Sh FILES
224.Bl -tag -width quota.group -compact
225.It Pa quota.user
226at the filesystem root with user quotas
227.It Pa quota.group
228at the filesystem root with group quotas
229.It Pa /etc/fstab
230to find filesystem names and locations
231.El
232.Sh DIAGNOSTICS
233Various messages about inaccessible files; self-explanatory.
234.Sh SEE ALSO
235.Xr quota 1 ,
236.Xr quotactl 2 ,
237.Xr fstab 5 ,
238.Xr quotacheck 8 ,
239.Xr quotaon 8 ,
240.Xr repquota 8
241