Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

quotactl(7i) [sunos man page]

quotactl(7I)							  Ioctl Requests						      quotactl(7I)

NAME
quotactl - manipulate disk quotas SYNOPSIS
#include <sys/fs/ufs_quota.h> int ioctl(int fd, Q_QUOTACTL, struct quotcl *qp) DESCRIPTION
This ioctl() call manipulates disk quotas. fd is the file descriptor returned by the open() system call after opening the quotas file (located in the root directory of the filesystem running quotas.) Q_QUOTACTL is defined in /usr/include/sys/fs/ufs_quota.h. qp is the address of the quotctl structure which is defined as struct quotctl { int op; uid_t uid; caddr_t addr; }; op indicates an operation to be applied to the user ID uid. (See below.) addr is the address of an optional, command specific, data struc- ture which is copied in or out of the system. The interpretation of addr is given with each value of op below. Q_QUOTAON Turn on quotas for a file system. addr points to the full pathname of the quotas file. uid is ignored. It is recommended that uid have the value of 0. This call is restricted to the super-user. Q_QUOTAOFF Turn off quotas for a file system. addr and uid are ignored. It is recommended that addr have the value of NULL and uid have the value of 0. This call is restricted to the super-user. Q_GETQUOTA Get disk quota limits and current usage for user uid. addr is a pointer to a dqblk structure (defined in <sys/fs/ufs_quota.h>). Only the super-user may get the quotas of a user other than himself. Q_SETQUOTA Set disk quota limits and current usage for user uid. addr is a pointer to a dqblk structure (defined in sys/fs/ufs_quota.h). This call is restricted to the super-user. Q_SETQLIM Set disk quota limits for user uid. addr is a pointer to a dqblk structure (defined in sys/fs/ufs_quota.h). This call is restricted to the super-user. Q_SYNC Update the on-disk copy of quota usages for this file system. addr and uid are ignored. Q_ALLSYNC Update the on-disk copy of quota usages for all file systems with active quotas. addr and uid are ignored. RETURN VALUES
This ioctl() returns: 0 on success. -1 on failure and sets errno to indicate the error. ERRORS
EFAULT addr is invalid. EINVAL The kernel has not been compiled with the QUOTA option. op is invalid. ENOENT The quotas file specified by addr does not exist. EPERM The call is privileged and the calling process did not assert {PRIV_SYS_MOUNT} in the effective set. ESRCH No disk quota is found for the indicated user. Quotas have not been turned on for this file system. EUSERS The quota table is full. If op is Q_QUOTAON, ioctl() may set errno to: EACCES The quota file pointed to by addr exists but is not a regular file. The quota file pointed to by addr exists but is not on the file system pointed to by special. EIO Internal I/O error while attempting to read the quotas file pointed to by addr. FILES
/usr/include/sys/fs/ufs_quota.h quota-related structure/function definitions and defines SEE ALSO
quota(1M), quotacheck(1M), quotaon(1M), getrlimit(2), mount(2) BUGS
There should be some way to integrate this call with the resource limit interface provided by setrlimit() and getrlimit(2). This call is incompatible with Melbourne quotas. SunOS 5.10 14 June 2004 quotactl(7I)

Check Out this Related Man Page

quotactl(2)							System Calls Manual						       quotactl(2)

NAME
quotactl - manipulate disk quotas SYNOPSIS
DESCRIPTION
manipulates disk quotas. cmd indicates a command to be applied to the user or group ID id. A command is composed of a primary command and a type that is used to interpret the id parameter. Types supported are USRQUOTA for users and GRPQUOTA for groups. To set the type of quota use the macro. Parameter special is a pointer to a null-terminated string containing the path name of the block special device for the file system being manipulated. The block special device must be mounted. The parameter addr is the address of an optional, command- specific, data structure which is copied in or out of the system. The interpretation of addr is explained with each command below: Turn on quotas for a file system. The parameter addr points to the path name of file containing the quotas for the file system. The quota file must exist; it is normally created using the command (see quotacheck(1M)). The id parameter is ignored. This call is restricted to users having appropriate privileges. Turn off quotas for a file system. The addr and id parameters are ignored. This call is restricted to the user with appropriate privileges. Get disk quota limits and current usage for user or group id. addr is a pointer to a structure (defined in Only users having appropriate privileges can get the quotas of a user other than himself. Get 64-bit disk quota limits and current usage for user or group id. addr is a pointer to a structure (defined in Only users having appropriate privileges can get the quotas of a user other than himself. VxFS 3.5 will only track usage for dqb64_curblocks up to to 2 TB. Set disk quota limits and current usage of files and blocks for user or group id. Note does not allow the current usage fields to be changed. addr is a pointer to a structure (defined in This call is restricted to users with appropriate privileges. Set 64-bit disk quota limits and current usage of files and blocks for user or group id. Note does not allow the current usage fields to be changed. addr is a pointer to a structure (defined in This call is restricted to users with the appropriate privileges. Set disk quota limits for user or group id. The parameter addr is a pointer to a structure (defined in This call is restricted to users with appropriate privileges. Set 64-bit disk quota limits for user or group id. The parameter addr is a pointer to a structure (defined in This call is restricted to users with the appro- priate privileges. Retrieve information about quotas supported by file system id. The parameter addr is a pointer to a flags word. The meaning of the various bit fields are defined in Update the on-disk copy of quota usages for a file system. If special is null, all file systems with active quotas are synced. The parameters addr and id are ignored. RETURN VALUE
Upon successful completion, returns 0; otherwise, it returns -1 and sets to indicate the error. ERRORS
fails when any of the following occurs: The quota file pointed to by addr exists but is either not a regular file or is not on the file system pointed to by special. attempted while another or is in progress. User's disk quota block limit has been reached for this file system. The addr or special parameter points to an invalid address. Reliable detection of this error is implementation-depen- dent. The parameters cmd and/or id are invalid. The parameter special contains a type of file system that does not support quotas. Currently, quotas are supported on HFS and VxFS file systems. The file specified by special or addr does not exist. The kernel has not been configured with the disk quota subsystem. The parameter special is not a block device. Type of quota not supported on the file system. 64-bit values will overflow 32-bit fields, either in the struct in the user level (for or in a 32-bit file system in the kernel (for and The call is privileged and the calling process does not have appropriate privileges. No disc quota is found for the indicated user or quotas have not been turned on for this file system. WARNINGS
The system call is incompatible with the 4.2/4.3 BSD implementation of Melbourne quotas which uses a different system call interface and on-disk data structure. Use and commands for 64-bit field values. AUTHOR
was developed by HP and Sun Microsystems, Inc. SEE ALSO
quota(1), edquota(1M), quotacheck(1M), quotaon(1M), rquotad(1M), mount(2), privileges(5), quota(5). quotactl(2)
Man Page