Disk space limit

From ISPWiki

Jump to: navigation, search

ISPmanager implements disk quotas to restrict disk space a user can consume. To enable this feature, the kernel must support disk quotas. In the control panel configuration file provide the following line to specify a disk partition where the user's data reside:

path quota /device

When setting up the site administrator' privileges the commands below will start:

/usr/sbin/setquota -g GID 0 102400 0 0 /device
/usr/sbin/setquota -u UID 0 0 0 0 /device

where GID,UID are group and user's identifiers; /device is the path to the disk, and 102400 is the maximum amount of disk space (in kilobyte). As you can see, for ISPmanager site administrator the quota can be configured only per group, because the site admin is the owner of FTP-users and mailboxes that are included into his group. Thus, disk quota assigned to the administrator will be applied to all the accounts that belong to this administrator.

If virtual users are used, when setting limits per FTP-user or mailbox, you can assign quota only on a per-user basis, rather than per group. The command is called:

/usr/sbin/setquota -u UID 0 102400 0 0 /device

If you are running Exim, you can set disk quotas per mailbox by specifying the maximum amount in the Exim passwd file. Exim will itself monitor the limits per mailbox. The quota per administrator group is also checked, as the mailbox files belong to the administrator group.

When displaying the list in the User management (ISPmanager) module, the control panel executes the command below to verify the disk quota (used/limit):

/usr/sbin/repquota -g -n /device

If you are running FreeBSD, ISPmanager executes commands directly from the system. However, you can use all of the above described commands for monitoring disk quotas.

Was this helpful? Yes | No
Personal tools