July 9, 2009 · Server · Email This Post
Share

If you're new here, you may want to subscribe to my RSS feed and if you have questions related to your ubuntu system post question to our forums. Thanks for visiting!

QUOTA is implemented using the BSD system call interface as the means of communication with the user level. This is based on the Melbourne quota system which uses both user and group quota files.

Quotatool is a utility to set filesystem quotas from the commandline. Most quota-utilities are interactive, requiring manual intervention from the user. Quotatool on the other hand is not, making it suitable for use in scripts and other non-interactive situations. This is very useful to edit disk quotas from scripts.

Install quota tools using the following command

sudo apt-get install quota quotatool

Edit /etc/fstab and add usrquota and grpquota options to the mount point which contains the home directories. For me this was the root mount point, but it will depends on how you did your partitoning (it could be that you made a separate mount point for /home).

sudo gedit /etc/fstab

The entry should read something like:

# /dev/hda1 UUID=4ea80ca3-37b7-447e-831a-700a38627029 / ext3 defaults,errors=remount-ro,usrquota,grpquota 0 1

Finish setup with the following series of commands

sudo touch /quota.user /quota.group

sudo chmod 600 /quota.*

sudo mount -o remount /

sudo quotacheck -avugm

sudo quotaon -avug

That’s it

You can also use webmin to configure this through GUI.

  • Share/Bookmark

Related Articles

1 Comment to “How to setup Disk Quotas in Ubuntu”

  1. LMB says:

    My present disk is 25000 larger than my first disk (1991), so for regular users there’s no point to implement this.

Leave a Reply