Understanding User and Group Quota system to limit web hosting storage

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?

Submit an answer

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!

Sign In or Sign Up to Answer

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.

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 Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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.