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