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. 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.9.2.3 2002/10/11 14:25:39 sobomax Exp $ 33.\" $DragonFly: src/usr.sbin/edquota/edquota.8,v 1.4 2006/05/26 19:39:40 swildner Exp $ 34.\" 35.Dd June 6, 1993 36.Dt EDQUOTA 8 37.Os 38.Sh NAME 39.Nm edquota 40.Nd edit user quotas 41.Sh SYNOPSIS 42.Nm 43.Op Fl u 44.Op Fl f Ar fspath 45.Op Fl p Ar proto-username 46.Ar username ... 47.Nm 48.Op Fl u 49.Fl e Ar fspath Ns Op : Ns Ar bslim Ns Op : Ns Ar bhlim Ns Op : Ns Ar islim Ns Op : Ns Ar ihlim 50.Op Fl e Ar ... 51.Ar username ... 52.Nm 53.Fl g 54.Op Fl f Ar fspath 55.Op Fl p Ar proto-groupname 56.Ar groupname ... 57.Nm 58.Fl g 59.Fl e Ar fspath Ns Op : Ns Ar bslim Ns Op : Ns Ar bhlim Ns Op : Ns Ar islim Ns Op : Ns Ar ihlim 60.Op Fl e Ar ... 61.Ar groupname ... 62.Nm 63.Fl t 64.Op Fl u 65.Op Fl f Ar fspath 66.Nm 67.Fl t 68.Fl g 69.Op Fl f Ar fspath 70.Sh DESCRIPTION 71.Nm Edquota 72is a quota editor. 73By default, or if the 74.Fl u 75flag is specified, 76one or more users may be specified on the command line. 77For each user a temporary file is created 78with an 79.Tn ASCII 80representation of the current 81disk quotas for that user. 82The list of filesystems with user quotas is determined from 83.Pa /etc/fstab . 84An editor is invoked on the 85.Tn ASCII 86file. 87The editor invoked is 88.Xr vi 1 89unless the environment variable 90.Ev EDITOR 91specifies otherwise. 92.Pp 93The quotas may then be modified, new quotas added, etc. 94Setting a quota to zero indicates that no quota should be imposed. 95Setting a hard limit to one indicates that no allocations should 96be permitted. 97Setting a soft limit to one with a hard limit of zero 98indicates that allocations should be permitted only on 99a temporary basis (see 100.Fl t 101below). 102The current usage information in the file is for informational purposes; 103only the hard and soft limits can be changed. 104.Pp 105On leaving the editor, 106.Nm 107reads the temporary file and modifies the binary 108quota files to reflect the changes made. 109.Pp 110If the 111.Fl p 112option is specified, 113.Nm 114will duplicate the quotas of the prototypical user 115specified for each user specified. 116This is the normal mechanism used to 117initialize quotas for groups of users. 118If the user given to assign quotas to is a numerical uid 119range (e.g. 1000-2000), then 120.Nm 121will duplicate the quotas of the prototypical user 122for each uid in the range specified. This allows 123for easy setup of default quotas for a group of users. 124The uids in question do not have to be currently assigned in 125.Pa /etc/passwd . 126.Pp 127If one or more 128.Fl e Ar fspath Ns Op : Ns Ar bslim Ns Op : Ns Ar bhlim Ns Op : Ns Ar islim Ns Op : Ns Ar ihlim 129options are specified, 130.Nm 131will non-interactively set quotas defined by 132.Ar bslim , 133.Ar bhlim , 134.Ar islim and 135.Ar ihlim 136on each particular filesystem referenced by 137.Ar fspath . 138Here 139.Ar bslim 140is soft limit on number of blocks, 141.Ar bslim 142is hard limit on number of blocks, 143.Ar islim 144is soft limit on number of files and 145.Ar ihlim 146is hard limit on number of files. 147If any of the 148.Ar bslim , 149.Ar bhlim , 150.Ar islim and 151.Ar ihlim 152values are omitted, it is assumed to be zero, therefore 153indicating that no quota should be imposed. 154.Pp 155If invoked with the 156.Fl f 157option, 158.Nm 159will read and modify quotas on the filesystem specified by 160.Ar fspath 161only. 162The 163.Ar fspath 164argument may be either a special device 165or a filesystem mount point. 166The primary purpose of this option is to set the scope for the 167.Fl p 168option, which would overwrite quota records on every 169filesystem with quotas otherwise. 170.Pp 171If the 172.Fl g 173flag is specified, 174.Nm 175is invoked to edit the quotas of 176one or more groups specified on the command line. 177The 178.Fl p 179flag can be specified in conjunction with 180the 181.Fl g 182flag to specify a prototypical group 183to be duplicated among the listed set of groups. 184Similarly, 185.Fl e 186flag can be specified in conjunction with 187the 188.Fl g 189flag to non-interactively set-up quotas on the listed set 190of groups. 191.Pp 192Users are permitted to exceed their soft limits 193for a grace period that may be specified per filesystem. 194Once the grace period has expired, 195the soft limit is enforced as a hard limit. 196The default grace period for a filesystem is specified in 197.In vfs/ufs/quota.h . 198The 199.Fl t 200flag can be used to change the grace period. 201By default, or when invoked with the 202.Fl u 203flag, 204the grace period is set for all the filesystems with user 205quotas specified in 206.Pa /etc/fstab . 207When invoked with the 208.Fl g 209flag the grace period is 210set for all the filesystems with group quotas specified in 211.Pa /etc/fstab . 212The grace period may be specified in days, hours, minutes, or seconds. 213Setting a grace period to zero indicates that the default 214grace period should be imposed. 215Setting a grace period to one second indicates that no 216grace period should be granted. 217.Pp 218Only the super-user may edit quotas. 219.Sh FILES 220.Bl -tag -width quota.group -compact 221.It Pa quota.user 222at the filesystem root with user quotas 223.It Pa quota.group 224at the filesystem root with group quotas 225.It Pa /etc/fstab 226to find filesystem names and locations 227.El 228.Sh DIAGNOSTICS 229Various messages about inaccessible files; self-explanatory. 230.Sh SEE ALSO 231.Xr quota 1 , 232.Xr quotactl 2 , 233.Xr fstab 5 , 234.Xr quotacheck 8 , 235.Xr quotaon 8 , 236.Xr repquota 8 237