1

I want to set a limit on how much each account can store, on Ubuntu 13.10. Is there a way to do this?

For example, I want to make it so each person can only store 40 GBs on their account

1 Answers1

1

Disk quotas must be established, and this YoLinux page illustrates the procedure, and this AskUbuntu page will also illustrate the concept.

A brief overview follows:

00) Decide if you want to assign storage limits individually or set by group.
0) If by group, create the group and assign users to it.
1) Edit file /etc/fstab to add qualifier "usrquota" or "grpquota" to the partition
2) Set the name for the quota, with

touch /partition/aquota.user

where the partition might be /home or some partition defined in /etc/fstab , then do (root should be the owner of the quota file) chmod 600 /partition/aquota.user

3) Re-mount the file partition with quotas, or reboot.

4) quotacheck -vgum /partition to scan a file system for disk usages, and update the quota record file "quota.user/aquota.user" to the most recent status. It's good to make sure this runs every reboot as well as weekly-to-quarterly with cron.

5) quotaon -av (and I'd watch for the result at reboot time)

6) 'edquota -u user_id' - and if you get zeros, something's broken (use 'edquota -g group_name' for groups, instead)

7) quota -u user_id will list the quota for that user, quota -q shows users over the quota limit and you can get a quota summary report with repquota -a

K7AAY
  • 17,705