1dea673e9SRodney W. Grimes.\" Copyright (c) 1983, 1990, 1993 2dea673e9SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 3dea673e9SRodney W. Grimes.\" 4dea673e9SRodney W. Grimes.\" This code is derived from software contributed to Berkeley by 5dea673e9SRodney W. Grimes.\" Robert Elz at The University of Melbourne. 6dea673e9SRodney W. Grimes.\" 7dea673e9SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 8dea673e9SRodney W. Grimes.\" modification, are permitted provided that the following conditions 9dea673e9SRodney W. Grimes.\" are met: 10dea673e9SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 11dea673e9SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 12dea673e9SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 13dea673e9SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 14dea673e9SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 15dea673e9SRodney W. Grimes.\" 3. All advertising materials mentioning features or use of this software 16dea673e9SRodney W. Grimes.\" must display the following acknowledgement: 17dea673e9SRodney W. Grimes.\" This product includes software developed by the University of 18dea673e9SRodney W. Grimes.\" California, Berkeley and its contributors. 19dea673e9SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors 20dea673e9SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 21dea673e9SRodney W. Grimes.\" without specific prior written permission. 22dea673e9SRodney W. Grimes.\" 23dea673e9SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 24dea673e9SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25dea673e9SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26dea673e9SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27dea673e9SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28dea673e9SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29dea673e9SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30dea673e9SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31dea673e9SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32dea673e9SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33dea673e9SRodney W. Grimes.\" SUCH DAMAGE. 34dea673e9SRodney W. Grimes.\" 35dea673e9SRodney W. Grimes.\" @(#)edquota.8 8.1 (Berkeley) 6/6/93 3697d92980SPeter Wemm.\" $FreeBSD$ 37dea673e9SRodney W. Grimes.\" 38681e5e7aSSteve Price.Dd June 6, 1993 39389766f3SMike Pritchard.Dt EDQUOTA 8 40389766f3SMike Pritchard.Os 41389766f3SMike Pritchard.Sh NAME 42389766f3SMike Pritchard.Nm edquota 43389766f3SMike Pritchard.Nd edit user quotas 44389766f3SMike Pritchard.Sh SYNOPSIS 45e97407b4SRuslan Ermilov.Nm 46389766f3SMike Pritchard.Op Fl u 47bc9c1e90SYaroslav Tykhiy.Op Fl f Ar fspath 48389766f3SMike Pritchard.Op Fl p Ar proto-username 49389766f3SMike Pritchard.Ar username ... 50e97407b4SRuslan Ermilov.Nm 51b8b743d7SMaxim Sobolev.Op Fl u 52c041c1e0SRuslan Ermilov.Fl e 53c041c1e0SRuslan Ermilov.Sm off 54c041c1e0SRuslan Ermilov.Ar fspath Op : Ar bslim Op : Ar bhlim Op : Ar islim Op : Ar ihlim 55c041c1e0SRuslan Ermilov.Sm on 56b8b743d7SMaxim Sobolev.Op Fl e Ar ... 57b8b743d7SMaxim Sobolev.Ar username ... 58b8b743d7SMaxim Sobolev.Nm 59389766f3SMike Pritchard.Fl g 60bc9c1e90SYaroslav Tykhiy.Op Fl f Ar fspath 61389766f3SMike Pritchard.Op Fl p Ar proto-groupname 62389766f3SMike Pritchard.Ar groupname ... 63e97407b4SRuslan Ermilov.Nm 64b8b743d7SMaxim Sobolev.Fl g 65c041c1e0SRuslan Ermilov.Fl e 66c041c1e0SRuslan Ermilov.Sm off 67c041c1e0SRuslan Ermilov.Ar fspath Op : Ar bslim Op : Ar bhlim Op : Ar islim Op : Ar ihlim 68c041c1e0SRuslan Ermilov.Sm on 69b8b743d7SMaxim Sobolev.Op Fl e Ar ... 70b8b743d7SMaxim Sobolev.Ar groupname ... 71b8b743d7SMaxim Sobolev.Nm 72389766f3SMike Pritchard.Fl t 73389766f3SMike Pritchard.Op Fl u 74bc9c1e90SYaroslav Tykhiy.Op Fl f Ar fspath 75e97407b4SRuslan Ermilov.Nm 76389766f3SMike Pritchard.Fl t 77389766f3SMike Pritchard.Fl g 78bc9c1e90SYaroslav Tykhiy.Op Fl f Ar fspath 79389766f3SMike Pritchard.Sh DESCRIPTION 80490d5836SPhilippe CharnierThe 81490d5836SPhilippe Charnier.Nm 82490d5836SPhilippe Charnierutility is a quota editor. 83389766f3SMike PritchardBy default, or if the 84389766f3SMike Pritchard.Fl u 85389766f3SMike Pritchardflag is specified, 86dea673e9SRodney W. Grimesone or more users may be specified on the command line. 87dea673e9SRodney W. GrimesFor each user a temporary file is created 88ea28e1c5SPhilippe Charnierwith an 89ea28e1c5SPhilippe Charnier.Tn ASCII 90ea28e1c5SPhilippe Charnierrepresentation of the current 91dea673e9SRodney W. Grimesdisk quotas for that user. 92dea673e9SRodney W. GrimesThe list of filesystems with user quotas is determined from 93389766f3SMike Pritchard.Pa /etc/fstab . 94ea28e1c5SPhilippe CharnierAn editor is invoked on the 95ea28e1c5SPhilippe Charnier.Tn ASCII 96ea28e1c5SPhilippe Charnierfile. 97dea673e9SRodney W. GrimesThe editor invoked is 98389766f3SMike Pritchard.Xr vi 1 99389766f3SMike Pritchardunless the environment variable 100389766f3SMike Pritchard.Ev EDITOR 101389766f3SMike Pritchardspecifies otherwise. 102389766f3SMike Pritchard.Pp 103dea673e9SRodney W. GrimesThe quotas may then be modified, new quotas added, etc. 104dea673e9SRodney W. GrimesSetting a quota to zero indicates that no quota should be imposed. 105dea673e9SRodney W. GrimesSetting a hard limit to one indicates that no allocations should 106dea673e9SRodney W. Grimesbe permitted. 107dea673e9SRodney W. GrimesSetting a soft limit to one with a hard limit of zero 108389766f3SMike Pritchardindicates that allocations should be permitted only on 109389766f3SMike Pritcharda temporary basis (see 110389766f3SMike Pritchard.Fl t 111389766f3SMike Pritchardbelow). 112dea673e9SRodney W. GrimesThe current usage information in the file is for informational purposes; 113dea673e9SRodney W. Grimesonly the hard and soft limits can be changed. 114389766f3SMike Pritchard.Pp 115dea673e9SRodney W. GrimesOn leaving the editor, 116389766f3SMike Pritchard.Nm 117dea673e9SRodney W. Grimesreads the temporary file and modifies the binary 118dea673e9SRodney W. Grimesquota files to reflect the changes made. 119389766f3SMike Pritchard.Pp 120dea673e9SRodney W. GrimesIf the 121389766f3SMike Pritchard.Fl p 122dea673e9SRodney W. Grimesoption is specified, 123389766f3SMike Pritchard.Nm 124dea673e9SRodney W. Grimeswill duplicate the quotas of the prototypical user 125dea673e9SRodney W. Grimesspecified for each user specified. 126dea673e9SRodney W. GrimesThis is the normal mechanism used to 127dea673e9SRodney W. Grimesinitialize quotas for groups of users. 128d172713dSMike PritchardIf the user given to assign quotas to is a numerical uid 129d172713dSMike Pritchardrange (e.g. 1000-2000), then 130389766f3SMike Pritchard.Nm 131d172713dSMike Pritchardwill duplicate the quotas of the prototypical user 132d172713dSMike Pritchardfor each uid in the range specified. This allows 133d172713dSMike Pritchardfor easy setup of default quotas for a group of users. 134d172713dSMike PritchardThe uids in question do not have to be currently assigned in 135ea28e1c5SPhilippe Charnier.Pa /etc/passwd . 136389766f3SMike Pritchard.Pp 137b8b743d7SMaxim SobolevIf one or more 138c041c1e0SRuslan Ermilov.Fl e 139c041c1e0SRuslan Ermilov.Sm off 140c041c1e0SRuslan Ermilov.Ar fspath Op : Ar bslim Op : Ar bhlim Op : Ar islim Op : Ar ihlim 141c041c1e0SRuslan Ermilov.Sm on 142b8b743d7SMaxim Sobolevoptions are specified, 143b8b743d7SMaxim Sobolev.Nm 144b8b743d7SMaxim Sobolevwill non-interactively set quotas defined by 145c041c1e0SRuslan Ermilov.Ar bslim , bhlim , islim 146c041c1e0SRuslan Ermilovand 147b8b743d7SMaxim Sobolev.Ar ihlim 148b8b743d7SMaxim Sobolevon each particular filesystem referenced by 149b8b743d7SMaxim Sobolev.Ar fspath . 150b8b743d7SMaxim SobolevHere 151b8b743d7SMaxim Sobolev.Ar bslim 152b8b743d7SMaxim Sobolevis soft limit on number of blocks, 153b8b743d7SMaxim Sobolev.Ar bslim 154b8b743d7SMaxim Sobolevis hard limit on number of blocks, 155b8b743d7SMaxim Sobolev.Ar islim 156b8b743d7SMaxim Sobolevis soft limit on number of files and 157b8b743d7SMaxim Sobolev.Ar ihlim 158b8b743d7SMaxim Sobolevis hard limit on number of files. 159b8b743d7SMaxim SobolevIf any of the 160c041c1e0SRuslan Ermilov.Ar bslim , bhlim , islim 161c041c1e0SRuslan Ermilovand 162b8b743d7SMaxim Sobolev.Ar ihlim 163b8b743d7SMaxim Sobolevvalues are omitted, it is assumed to be zero, therefore 164b8b743d7SMaxim Sobolevindicating that no quota should be imposed. 165b8b743d7SMaxim Sobolev.Pp 166bc9c1e90SYaroslav TykhiyIf invoked with the 167bc9c1e90SYaroslav Tykhiy.Fl f 168bc9c1e90SYaroslav Tykhiyoption, 169bc9c1e90SYaroslav Tykhiy.Nm 170bc9c1e90SYaroslav Tykhiywill read and modify quotas on the filesystem specified by 171bc9c1e90SYaroslav Tykhiy.Ar fspath 172bc9c1e90SYaroslav Tykhiyonly. 173bc9c1e90SYaroslav TykhiyThe 174bc9c1e90SYaroslav Tykhiy.Ar fspath 175bc9c1e90SYaroslav Tykhiyargument may be either a special device 176bc9c1e90SYaroslav Tykhiyor a filesystem mount point. 177bc9c1e90SYaroslav TykhiyThe primary purpose of this option is to set the scope for the 178bc9c1e90SYaroslav Tykhiy.Fl p 179bc9c1e90SYaroslav Tykhiyoption, which would overwrite quota records on every 180bc9c1e90SYaroslav Tykhiyfilesystem with quotas otherwise. 181bc9c1e90SYaroslav Tykhiy.Pp 182389766f3SMike PritchardIf the 183389766f3SMike Pritchard.Fl g 184389766f3SMike Pritchardflag is specified, 185389766f3SMike Pritchard.Nm 186dea673e9SRodney W. Grimesis invoked to edit the quotas of 187dea673e9SRodney W. Grimesone or more groups specified on the command line. 188389766f3SMike PritchardThe 189389766f3SMike Pritchard.Fl p 190389766f3SMike Pritchardflag can be specified in conjunction with 191389766f3SMike Pritchardthe 192389766f3SMike Pritchard.Fl g 193389766f3SMike Pritchardflag to specify a prototypical group 194dea673e9SRodney W. Grimesto be duplicated among the listed set of groups. 195b8b743d7SMaxim SobolevSimilarly, 196b8b743d7SMaxim Sobolev.Fl e 197b8b743d7SMaxim Sobolevflag can be specified in conjunction with 198b8b743d7SMaxim Sobolevthe 199b8b743d7SMaxim Sobolev.Fl g 200b8b743d7SMaxim Sobolevflag to non-interactively set-up quotas on the listed set 201b8b743d7SMaxim Sobolevof groups. 202389766f3SMike Pritchard.Pp 203dea673e9SRodney W. GrimesUsers are permitted to exceed their soft limits 204dea673e9SRodney W. Grimesfor a grace period that may be specified per filesystem. 205dea673e9SRodney W. GrimesOnce the grace period has expired, 206dea673e9SRodney W. Grimesthe soft limit is enforced as a hard limit. 207dea673e9SRodney W. GrimesThe default grace period for a filesystem is specified in 208389766f3SMike Pritchard.Pa /usr/include/ufs/ufs/quota.h . 209389766f3SMike PritchardThe 210389766f3SMike Pritchard.Fl t 211389766f3SMike Pritchardflag can be used to change the grace period. 212389766f3SMike PritchardBy default, or when invoked with the 213389766f3SMike Pritchard.Fl u 214389766f3SMike Pritchardflag, 215dea673e9SRodney W. Grimesthe grace period is set for all the filesystems with user 216dea673e9SRodney W. Grimesquotas specified in 217389766f3SMike Pritchard.Pa /etc/fstab . 218389766f3SMike PritchardWhen invoked with the 219389766f3SMike Pritchard.Fl g 220389766f3SMike Pritchardflag the grace period is 221dea673e9SRodney W. Grimesset for all the filesystems with group quotas specified in 222389766f3SMike Pritchard.Pa /etc/fstab . 223dea673e9SRodney W. GrimesThe grace period may be specified in days, hours, minutes, or seconds. 224dea673e9SRodney W. GrimesSetting a grace period to zero indicates that the default 225dea673e9SRodney W. Grimesgrace period should be imposed. 226dea673e9SRodney W. GrimesSetting a grace period to one second indicates that no 227dea673e9SRodney W. Grimesgrace period should be granted. 228389766f3SMike Pritchard.Pp 229dea673e9SRodney W. GrimesOnly the super-user may edit quotas. 230389766f3SMike Pritchard.Sh FILES 231389766f3SMike Pritchard.Bl -tag -width quota.group -compact 232389766f3SMike Pritchard.It Pa quota.user 233389766f3SMike Pritchardat the filesystem root with user quotas 234389766f3SMike Pritchard.It Pa quota.group 235389766f3SMike Pritchardat the filesystem root with group quotas 236389766f3SMike Pritchard.It Pa /etc/fstab 237389766f3SMike Pritchardto find filesystem names and locations 238389766f3SMike Pritchard.El 239389766f3SMike Pritchard.Sh SEE ALSO 240389766f3SMike Pritchard.Xr quota 1 , 241bfd34a4aSWolfram Schneider.Xr quotactl 2 , 2428288fd54SChris Costello.Xr fstab 5 , 243389766f3SMike Pritchard.Xr quotacheck 8 , 244389766f3SMike Pritchard.Xr quotaon 8 , 245389766f3SMike Pritchard.Xr repquota 8 246389766f3SMike Pritchard.Sh DIAGNOSTICS 247dea673e9SRodney W. GrimesVarious messages about inaccessible files; self-explanatory. 248