SETQUOTA(2,L) AIX Technical Reference SETQUOTA(2,L)
-------------------------------------------------------------------------------
setquota
PURPOSE
Enables or disables quotas on a file system.
SYNTAX
int setquota (special, file)
char *special, *file;
DESCRIPTION
Disk quotas are enabled or disabled with the setquota system call. The special
parameter indicates a block special device on which a mounted file system
exists. If the file parameter is not NULL, it specifies a file in that file
system from which to take the quotas. If the file parameter is NULL, quotas
are disabled on that file system. The quota file must exist; it is normally
created with the quotacheck program. Only the superuser may turn quotas on or
off.
RETURN VALUE
A 0 return value indicates that the call succeeded. A return value of -1
indicates that an error occurred, and an error code is stored in the global
variable errno.
ERROR CONDITIONS
The possible errors are:
EINVAL The system is not configured to support the QUOTA option.
EPERM The command requires privilege, and the calling process's effective
user ID was not superuser.
ENODEV The device associated with special does not exist.
ENOTBLK The device associated with special is not a block device.
ENXIO The device associated with special does not exist.
EROFS The file specified by file resides on a read-only file system.
EACCES The file specified by file resides on a file system different from
special.
EACCES The file specified by file is not a plain file.
Processed November 7, 1990 SETQUOTA(2,L) 1
SETQUOTA(2,L) AIX Technical Reference SETQUOTA(2,L)
EIO An I/O error occurred while accessing the file specified by file.
The following errors are applicable to any system call which requires path name
resolution:
ENOTDIR A component of the path prefix is a not a directory.
ENOENT A component of the path prefix does not exist.
EACCES Search permission is denied on a component of the path prefix.
ENOENT The path name is null.
ENAMETOOLONG
A component of a path name exceeds 255 characters, or an entire path
name exceeds 1023 characters.
ESTALE The process's root or current directory is located in an NFS virtual
file system that has been unmounted.
EFAULT The special or file parameter points to a location outside of the
process's allocated address space.
ELOOP Too many symbolic links were encountered in translating the path
name.
EIO An I/O error occurred during the operation.
If the Transparent Computing Facility is installed on your system, setquota can
also fail if one or more of the following are true:
ESITEDN1 Either special or file cannot be accessed because a site went down.
ESITEDN2 The operation was terminated because a site failed.
ENOSTORE special or file is a name relative to the working directory, but no
site which stores this directory is currently up.
ENOSTORE A component of special or file is replicated but is not stored on any
site which is currently up.
EROFS file resides on a replicated file system in which the primary copy is
unavailable.
ENLDEV special is a non-TTY character special file which corresponds to a
device physically attached to another site in the cluster.
EINTR A signal was caught during the system call.
RELATED INFORMATION
Processed November 7, 1990 SETQUOTA(2,L) 2
SETQUOTA(2,L) AIX Technical Reference SETQUOTA(2,L)
In this book: "getrlimit, setrlimit, vlimit," "getrusage, vtimes," "ulimit,"
and "quota."
The description of quotacheck and quotaon in AIX Operating System Commands
Reference.
Processed November 7, 1990 SETQUOTA(2,L) 3