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$ 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 76The 77.Nm 78utility is a quota editor. 79By default, or if the 80.Fl u 81flag is specified, 82one or more users may be specified on the command line. 83For each user a temporary file is created 84with an 85.Tn ASCII 86representation of the current 87disk quotas for that user. 88The list of file systems with user quotas is determined from 89.Pa /etc/fstab . 90An editor is invoked on the 91.Tn ASCII 92file. 93The editor invoked is 94.Xr vi 1 95unless the environment variable 96.Ev EDITOR 97specifies otherwise. 98.Pp 99The quotas may then be modified, new quotas added, etc. 100Setting a quota to zero indicates that no quota should be imposed. 101Setting a hard limit to one indicates that no allocations should 102be permitted. 103Setting a soft limit to one with a hard limit of zero 104indicates that allocations should be permitted only on 105a temporary basis (see 106.Fl t 107below). 108The current usage information in the file is for informational purposes; 109only the hard and soft limits can be changed. 110.Pp 111On leaving the editor, 112.Nm 113reads the temporary file and modifies the binary 114quota files to reflect the changes made. 115.Pp 116If the 117.Fl p 118option is specified, 119.Nm 120will duplicate the quotas of the prototypical user 121specified for each user specified. 122This is the normal mechanism used to 123initialize quotas for groups of users. 124If the user given to assign quotas to is a numerical uid 125range (e.g.\& 1000-2000), then 126.Nm 127will duplicate the quotas of the prototypical user 128for each uid in the range specified. 129This allows 130for easy setup of default quotas for a group of users. 131The uids in question do not have to be currently assigned in 132.Pa /etc/passwd . 133.Pp 134If 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 139options are specified, 140.Nm 141will non-interactively set quotas defined by 142.Ar bslim , bhlim , islim , 143and 144.Ar ihlim 145on each particular file system referenced by 146.Ar fspath . 147Here 148.Ar bslim 149is the soft limit on the number of blocks, 150.Ar bhlim 151is the hard limit on the number of blocks, 152.Ar islim 153is the soft limit on the number of files, and 154.Ar ihlim 155is the hard limit on the number of files. 156If any of the 157.Ar bslim , bhlim , islim , 158and 159.Ar ihlim 160values is omitted, it is assumed to be zero, therefore 161indicating that no particular quota should be imposed. 162.Pp 163If invoked with the 164.Fl f 165option, 166.Nm 167will read and modify quotas on the file system specified by 168.Ar fspath 169only. 170The 171.Ar fspath 172argument may be either a special device 173or a file system mount point. 174The primary purpose of this option is to set the scope for the 175.Fl p 176option, which would overwrite quota records on every 177file system with quotas otherwise. 178.Pp 179If the 180.Fl g 181flag is specified, 182.Nm 183is invoked to edit the quotas of 184one or more groups specified on the command line. 185The 186.Fl p 187flag can be specified in conjunction with 188the 189.Fl g 190flag to specify a prototypical group 191to be duplicated among the listed set of groups. 192Similarly, 193.Fl e 194flag can be specified in conjunction with 195the 196.Fl g 197flag to non-interactively set-up quotas on the listed set 198of groups. 199.Pp 200Users are permitted to exceed their soft limits 201for a grace period that may be specified per file system. 202Once the grace period has expired, 203the soft limit is enforced as a hard limit. 204The default grace period for a file system is specified in 205.In ufs/ufs/quota.h . 206The 207.Fl t 208flag can be used to change the grace period. 209By default, or when invoked with the 210.Fl u 211flag, 212the grace period is set for all the file systems with user 213quotas specified in 214.Pa /etc/fstab . 215When invoked with the 216.Fl g 217flag the grace period is 218set for all the file systems with group quotas specified in 219.Pa /etc/fstab . 220The grace period may be specified in days, hours, minutes, or seconds. 221Setting a grace period to zero indicates that the default 222grace period should be imposed. 223Setting a grace period to one second indicates that no 224grace period should be granted. 225Quotas must be turned off for the file system and 226then turned back on for the new grace period to take effect. 227.Pp 228Only the super-user may edit quotas. 229.Sh FILES 230.Bl -tag -width quota.group -compact 231.It Pa quota.user 232at the file system root with user quotas 233.It Pa quota.group 234at the file system root with group quotas 235.It Pa /etc/fstab 236to find file system names and locations 237.El 238.Sh DIAGNOSTICS 239Various 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 247