Computer Science


QUOTACTL(2)                                           QUOTACTL(2)

NAME
       quotactl - manipulate disk quotas

SYNOPSIS
       #include <linux/quota.h>

       int quotactl(cmd, special, uid, addr)
       int cmd;
       char *special;
       int uid;
       caddr_t addr;

DESCRIPTION
       The  quotactl()  call  manipulates disk quotas.  cmd indi-
       cates a command to be applied to UID id or GID id.  To set
       the  type  of quota use the QCMD(cmd,type) macro.  special
       is a pointer to a null-terminated  string  containing  the
       path  name of the block special device for the file system
       being manipulated.  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  given  with
       each command below.

       Q_QUOTAON      Turn  on  quotas  for  a file system.  addr
                      points to the path name of file  containing
                      the  quotas for the file system.  The quota
                      file must exist;  it  is  normally  created
                      with  the quotacheck(8) program.  This call
                      is restricted to the super-user.

       Q_QUOTAOFF     Turn off quotas for a  file  system.   addr
                      and   uid   are   ignored.   This  call  is
                      restricted to the super-user.

       Q_GETQUOTA     Get disk quota limits and current usage for
                      user  or  group id.  addr is a pointer to a
                      dqblk      structure      (defined       in
                      <linux/quota.h>).   Only the super-user may
                      get the quotas of a user  other  than  him-
                      self.

       Q_SETQUOTA     Set disk quota limits and current usage for
                      user or group id.  addr is a pointer  to  a
                      dqblk       structure      (defined      in
                      <linux/quota.h>).  This call is  restricted
                      to the super-user.

       Q_SETQLIM      Set disk quota limits for user or group id.
                      addr is a  pointer  to  a  dqblk  structure
                      (defined in <linux/quota.h>).  This call is
                      restricted to the super-user.

       Q_SYNC         Update the on-disk copy of quota usages for
                      a file system.  If special is null then all
                      file  systems  with   active   quotas   are
                      sync'ed.  addr and uid are ignored.

RETURN VALUES
       quotactl() returns:

       0      on success.

       -1     on failure and sets errno to indicate the error.

ERRORS
       EFAULT         addr or special are invalid.

       EINVAL         The  kernel  has not been compiled with the
                      QUOTA option.

                      cmd is invalid.

       ENOENT         The file specified by special or addr  does
                      not exist.

       ENOTBLK        special is not a block device.

       EPERM          The  call  is privileged and the caller was
                      not the super-user.

       ESRCH          No disc quota is found  for  the  indicated
                      user.

                      Quotas  have  not  been  turned on for this
                      file system.

       EUSERS         The quota table is full.

       If cmd is Q_QUOTAON quotactl( 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.

       EBUSY          Q_QUOTAON attempted while another Q_QUOTAON
                      has already taken place.

SEE ALSO
       quota(1), getrlimit(2), quotacheck(8), quotaon(8)

                          Tue Jun 8 1993                        1

Back to the index


Apply now!


Handbook

Postgraduate study options

Computer Science Blog



Please give us your feedback or ask us a question

This message is...


My feedback or question is...


My email address is...

(Only if you need a reply)

A to Z Directory | Site map | Accessibility | Copyright | Privacy | Disclaimer | Feedback on this page