1 .\" Copyright (c) 1983, 1990, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" This code is derived from software contributed to Berkeley by
5 .\" Robert Elz at The University of Melbourne.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
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.
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
35 .\" @(#)quotactl.2 8.2 (Berkeley) 3/10/95
36 .\" $FreeBSD: src/lib/libc/sys/quotactl.2,v 1.12.2.7 2002/05/20 09:06:37 roam Exp $
43 .Nd manipulate filesystem quotas
50 .Fn quotactl "const char *path" "int cmd" "int id" "void *addr"
54 call enables, disables and
55 manipulates filesystem quotas.
56 A quota control command
59 operates on the given filename
63 (NOTE: One should use the QCMD macro defined in
64 .Ao Pa ufs/ufs/quota.h Ac
65 to formulate the value for
67 The address of an optional command specific data structure,
69 may be given; its interpretation
70 is discussed below with each command.
72 Currently quotas are supported only for the
77 a command is composed of a primary command (see below)
78 and a command type used to interpret the
80 Types are supported for interpretation of user identifiers (USRQUOTA)
81 and group identifiers (GRPQUOTA).
84 specific commands are:
85 .Bl -tag -width Q_QUOTAOFFxx
87 Enable disk quotas for the filesystem specified by
89 The command type specifies the type of the quotas being enabled.
92 argument specifies a file from which to take the quotas.
93 The quota file must exist;
94 it is normally created with the
100 Only the super-user may turn quotas on.
102 Disable disk quotas for the filesystem specified by
104 The command type specifies the type of the quotas being disabled.
109 arguments are unused.
110 Only the super-user may turn quotas off.
112 Get disk quota limits and current usage for the user or group
113 (as determined by the command type) with identifier
118 structure (defined in
119 .Ao Pa ufs/ufs/quota.h Ac ) .
121 Set disk quota limits for the user or group
122 (as determined by the command type) with identifier
127 structure (defined in
128 .Ao Pa ufs/ufs/quota.h Ac ) .
129 The usage fields of the
131 structure are ignored.
132 This call is restricted to the super-user.
134 Set disk usage limits for the user or group
135 (as determined by the command type) with identifier
140 structure (defined in
141 .Ao Pa ufs/ufs/quota.h Ac ) .
142 Only the usage fields are used.
143 This call is restricted to the super-user.
145 Update the on-disk copy of quota usages.
146 The command type specifies which type of quotas are to be updated.
151 parameters are ignored.
161 The kernel has not been compiled with the
165 The quota table cannot be expanded.
168 or the command type is invalid.
173 quotas are not currently enabled for this filesystem.
177 the quota file is not a plain file.
179 Search permission is denied for a component of a path prefix.
181 A component of a path prefix was not a directory.
182 .It Bq Er ENAMETOOLONG
183 A component of either pathname exceeded 255 characters,
184 or the entire length of either path name exceeded 1023 characters.
186 A filename does not exist.
188 Too many symbolic links were encountered in translating a pathname.
192 the quota file resides on a read-only filesystem.
196 error occurred while reading from or writing
197 to a file containing quotas.
201 was supplied; the associated structure could not be copied in or out
205 points outside the process's allocated address space.
207 The call was privileged and the caller was not the super-user.
217 There should be some way to integrate this call with the resource
218 limit interface provided by
225 function call appeared in