quotaon or quotaoff Command

Purpose

Turns on and off file system quotas.

Syntax

quotaon [ -g ] [ -u ] [ -v ] { -a | FileSystem ... }

quotaoff [ -g ] [ -u ] [ -v ] { -a | FileSystem ... }

Description

The quotaon command enables disk quotas for one or more file systems specified by the FileSystem parameter. The specified file system must be defined with quotas in the /etc/filesystems file, and must be mounted. The quotaon command looks for the quota.user and quota.group files in the root directory of the associated file system, and will return an error if not found.
Note: For JFS only, the default quota file names (quota.user and quota.group) may be overridden in the /etc/filesystems file. The quota files can be external to the quota enabled file system by specifying full paths in the /etc/filesystems file. For JFS2 file systems, the file names may not be overridden and must reside in the root directory of the file system.
By default, both user and group quotas are enabled. The -u flag enables only user quotas; the -g flag enables only group quotas. Specifying both -g and -u flags is equivalent to the default (no option specified). The -a flag specifies that all file systems with disk quotas, as indicated by the /etc/filesystems file, are enabled.

The quotaoff command disables disk quotas for one or more file systems. By default, both user and group quotas are disabled. The -a, -g, and -u flags operate as with the quotaon command. The -v flag prints a message for each quota type (user or group) in every file system in which quotas are turned on or off with the quotaon and quotaoff commands, respectively.

An error (EPERM) will be returned if the quota.user and quota.group files are not owned by user root and group system. Ownership changes on these files are not permitted while quotas are active.

Flags

Item Description
-a Enables or disables all file systems that are read-write and have disk quotas, as indicated by the /etc/filesystems file. When used with the -g flag, only group quotas in the /etc/filesystems file are enabled or disabled; when used with the -u flag, only user quotas in the /etc/filesystems file are enabled or disabled.
-g Specifies that only group quotas are enabled or disabled.
-u Specifies that only user quotas are enabled or disabled.
-v Prints a message for each file system in which quotas are turned on or off.

Security

Access Control: Only the root user can execute this command.

Attention RBAC users and Trusted AIX® users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

  1. To enable user quotas for the /usr file system, enter:
    quotaon -u /usr
  2. To disable user and group quotas for all file systems in the /etc/filesystems file and print a message, enter:
    quotaoff -v -a

Files

Item Description
quota.user Specifies user quotas.
quota.group Specifies group quotas.
/etc/filesystems Contains file system names and locations.