Implementing Quotas

To reiterate, quotas might not be enabled by default, even if the quota software package is installed on your system. When quotas are installed and enabled, you can see which partitions have either user quotas, group quotas, or both by looking at the fourth field in the /etc/fstab file. For example, one line in /etc/fstab shows that quotas are enabled for the /home partition:

/dev/hda5 /home ext3 defaults,usrquota,grpquota 1 1

The root of the partition with quotas enabled will have the files quota.user or in them (or both files, if both types of quotas are enabled), and the files will contain the actual quotas. The permissions of these files should be 600 so that users cannot read or write to them. (Otherwise, users would change them to allow ample space for their music files and Internet art collections.) To initialize disk quotas, the partitions must be remounted. This is easily accomplished with the following:

# mount -o ro,remount partition to be remounted mount point

The underlying console tools (complete with man pages) are

• quotaon, quotaoff Toggles quotas on a partition

• repquota A summary status report on users and groups

• quotacheck Updates the status of quotas (compares new and old tables of disk usage); it is run after fsck

• edquota A basic quota management command

Was this article helpful?

0 0

Post a comment