User Management In Ubuntu (6) Hard Disk Quota

Source: Internet
Author: User
In a large multi-user system, you usually need to control the hard disk size that each user can use. To manage the hard disk quota, you must install the quota and quotatool packages. Disk Quota Management in Ubuntu is disabled by default and can be enabled and configured by the system administrator. The system administrator can use a series of commands related to the hard disk quota: quotacheck to initialize the quota database file; edquota to set and edit the user quota; setquota to configure the hard disk quota; quotaon and quotao

In a large multi-user system, you usually need to control the hard disk size that each user can use.

To manage the hard disk quota, you must install the quota and quotatool packages. Disk Quota Management in Ubuntu is disabled by default and can be enabled and configured by the system administrator. The system administrator can use a series of commands related to the hard disk quota: quotacheck to initialize the quota database file; edquota to set and edit the user quota; set quota to configure the hard disk quota; quotaon and quotaoff to control the quota service; warnquota automatically sends emails to users who exceed the hard disk quota.

Quotas is not enabled even if the quota package is installed. After the quota service is enabled, you can view the/etc/fstb file and define the hard disk quota information in the 4th fields of each row. For example:

/Dev/hda5/home/ext3 defaults, usrquota, kgquota 1 1

The/home partition starts the quota service. Two files, quota. user and quota. group, can be found in the root directory where the quota service is enabled. The file contains the specific quota information. The permission for these two files is 600, that is, the user cannot write all files; otherwise, the user may allocate a larger quota for himself.

To initialize the hard disk quota, the partition must be remounted. Run the following command:

Sudo mount-o ro, remount partition_to_be_remounted mount_point

Common Hard Disk Quota Commands include:

Quotaon, quotaoff -- start or close the quota service for a partition

Repquota-Status report on Hard Disk Quota of users and groups

Quotacheck -- Update the quota status (run after fsck to compare the usage of the New and Old hard disks)

Edquota-basic quota management command

You can enable or disable the hard disk quota service by changing the entries in the/etc/fstab file. Add the usrquota or kgquota option to the 4th fields.

You can also create the quota. user and quota. group files in the root directory of the partition, and then use the quotaon command to start the hard disk quota service.

Sudo touch/quota. user (create the quota. user File)

Sudo quotaon-av (enable Hard Disk Quota Service)

Quota-v (users can query their hard disk quota)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.