quotas not linked to users but to directories

Usually, quotas are enforced per user, as related to the proprietary of the file.

Is it possible to apply a quota on a folder basis, in such a way, that a folder contents are limited in disk space?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Same question asked and answered over here:

https://stackoverflow.com/questions/8148715/how-to-set-limit-on-directory-size-in-linux

basically, make a virtual filesystem by filling a file with zeros to the size you want, then create a filesystem in that file and then loopmount it to the directory you want to limit.

Linux Quartly article about it here:
http://www.linuxquestions.org/questions/linux-server-73/directory-quota-601140/

Tutorial here:
http://souptonuts.sourceforge.net/quota_tutorial.html


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x