Книга: Fedora™ Unleashed, 2008 edition

Implementing Quotas

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 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/sda5 /home ext3 defaults,usrquota,grpquota 1 1

The root of the partition with quotas enabled has the files aquota.user or aquota.group in them (or both files, if both types of quotas are enabled), and the files 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 as follows:

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.

Оглавление книги

Оглавление статьи/книги

Генерация: 1.087. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз