// Tutorial //

How To Enable User Quotas

Published on February 11, 2013
How To Enable User Quotas

Status: Deprecated

This article is deprecated and no longer maintained.


The information in this article is out of date and untested. More recent information about quotas is listed below.

See Instead:

How To Set Filesystem Quotas on Ubuntu 18.04 or Debian 9.

Quotas can be used on servers to set limits on how much diskspace an individual server user can take up on a server. They can be edited in the /etc/fstab file.

In order to enable quotas, first open the /etc/fstab file:

nano /etc/fstab

Within that file, edit the following line, adding in the word, “usrquota”:

LABEL=DOROOT	   /               ext4    errors=remount-ro,usrquota 0       1

Save and exit

The /etc/fstab file should now look like this:

LABEL=DOROOT       /               ext4    errors=remount-ro,usrquota 0       1
none             /dev/shm      tmpfs   defaults                    0 0

To finish up, remount the file system whose fstab entry has ben changed:

 mount -o remount /
By Etel Sverdlov

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about us

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in our Questions & Answers section, find tutorials and tools that will help you grow as a developer and scale your project or business, and subscribe to topics of interest.

Sign up now
About the authors

Still looking for an answer?

Ask a questionSearch for more help

Was this helpful?
Leave a comment...

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Hi. I followed the guide here but I get this message. Is this cause for concern? I used it on a Centos7 machine.

quotacheck: Your kernel probably supports journaled quota but you are not using it. Consider switching to journaled quota to avoid running quotacheck after an unclean shutdown. quotacheck: Quota for users is enabled on mountpoint / so quotacheck might damage the file. Please turn quotas off or use -f to force checking.

My original fstab:

LABEL=DOROOT / ext4 defaults 1 1

Which I edited to

LABEL=DOROOT / ext4 errors=remount-ro,usrquota 0 1

Thanks in advance for the help.

You should run first the command: quotacheck -vagum -F vfsv0 this will create the quota files and then you can follow the following tutorial: http://serverfault.com/questions/37737/quotas-in-vsftpd

Any luck experts!

Any luck guys

For me

Output for fdisk -l

Disk /dev/vda: 21.5 GB, 21474836480 bytes 16 heads, 63 sectors/track, 41610 cylinders, total 41943040 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000

Disk /dev/vda doesn’t contain a valid partition table

Output for df -ah

Filesystem Size Used Avail Use% Mounted on /dev/vda 20G 1.8G 18G 10% / proc 0 0 0 - /proc sysfs 0 0 0 - /sys none 0 0 0 - /sys/fs/fuse/connections none 0 0 0 - /sys/kernel/debug none 0 0 0 - /sys/kernel/security udev 246M 4.0K 246M 1% /dev devpts 0 0 0 - /dev/pts tmpfs 100M 212K 99M 1% /run none 5.0M 0 5.0M 0% /run/lock none 248M 0 248M 0% /run/shm

Kamal Nasser
DigitalOcean Employee
DigitalOcean Employee badge
October 12, 2013

@paul.cherepnin: What’s the output of <code>sudo fdisk -l</code> and <code>df -ah</code>?


I’ve got the same problem…

Hi, I have followed he tutorial but I am facing issues. The following message comes if I run the command:

sudo quotacheck -vguma

quotacheck: Cannot guess format from filename on /dev/disk/by-label/DOROOT. Please specify format on commandline. quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option.

My fstab is here:

LABEL=DOROOT / ext3 defaults,errors=remount-ro,usrquota,grpquota,barrier=0 1 1 none /dev/shm tmpfs defaults 0 0 /swapfile none swap sw 0 0