Plainnotes

Disk quotas so one account cannot fill the machine

2025-04-16 · 2 min readSystems

On a shared machine one account fills /home and everything else falls over. Quotas are the standard answer.

Mount with usrquota,grpquota in /etc/fstab, remount.

Initialize:

quotacheck -cugm /home
quotaon -v /home

Then set limits:

setquota -u alice 2097152 3145728 0 0 /home

Sizes are in KB: a 2G soft limit and a 3G hard limit, with a grace period (seven days by default) after the soft one.

Run quotacheck while nothing is writing, or the numbers are wrong. ext4 also supports project quotas, which fit per-project isolation better than per-user ones.