Understanding User and Group Quota system to limit web hosting storage

Posted December 8, 2016 2.3k views
CentOSServer OptimizationScalingStorage

So I’ve been looking at the DigitalOcean guide for setting up the Quota system, so you may limit how much space a user can take up. This is usually done on /home, however I’m about to set it up on the /www section for all the webhosting. To clarify, each domain is hosted with an SFTP only NO SSH user, so the /home restriction isn’t necessary. The www area is also set as the root for this group of users.

What I want to know is: If you apply a Group Quota to a folder/volume, does that mean the combined group’s amount of storage is limited, OR, each user within that group has this limit?

I ideally would like to set a policy that each user has the same X amount of limit in this web host area, without needing to edit existing users / manage new users better. Can I define a group policy of 100mb to the web folder, thereby limiting each user to a 100mb area? Or is there another way to do this?

All else fails my new user bash script will have to include manual limitations per user. For large scale though, is there a way to globally apply this?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

I believe that while user quotas will allow you to restrict how much disk space can be used by an individual user, group quotas are a quota for the group rather than a common template quota for each member of that group. So setting a group quota for the group ‘webusers’ at 100mb in ’/www’ would set a total limit for files uploaded by all members of 'webusers’ of 100mb.

You would have to use user quotas in order to give each user their own limit.