Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 22nd January 2008, 12:24
normanp normanp is offline
Member
 
Join Date: Dec 2007
Posts: 33
Thanks: 5
Thanked 1 Time in 1 Post
Default Ubu Server 7.10 Quota setup for groups

I have problems setting this up for a group. Am I right that a group quota applies its values to members of the group as individuals effectively?
The following works for me for individuals:
quotaoff -a
(then in /etc/fstab)
for / after 'defaults' add ',usrquota,grpquota'
mount -o remount /
touch /aquota.user /aquota.group
chmod 600 /aquota.*
edquota -u mike
(set soft blocks 1000, hard blocks 1500)
repquota /
(to see if all OK - it is)
quotaon -a

The user quota now works fine and from a Vista machine it is enforced.

Now for my problem: group quotas don't function when I do this:


quotaoff -a
edquota -u mike (to remove his quota limits (put back to 0))
addgroup standardusers
adduser mike standardusers
edquota -g standardusers
(set soft blocks 1000, hard blocks 1500)
repquota /
(to see if all OK - but standardusers not listed - why?)
quotaon -a

There is now no limit on mike - the group quota is not enforced!

Further questions:
Are the block quota values in kB?
Why did I have to create aquota.user etc not quota.user? (quota did not enforce limits with quota.user)

Thanks for all advice for this newb
Reply With Quote
Sponsored Links
  #2  
Old 23rd January 2008, 13:40
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

Does mike belong to the group?
Quote:
Are the block quota values in kB?
Yes.

Quote:
Why did I have to create aquota.user etc not quota.user? (quota did not enforce limits with quota.user)
This changes from distirbution to distribution. Some use the (old) quota.* format, some the newer aquota.* format.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 23rd January 2008, 15:47
normanp normanp is offline
Member
 
Join Date: Dec 2007
Posts: 33
Thanks: 5
Thanked 1 Time in 1 Post
Default

Yes - mike belongs to that group.

After a lot of thinking I have realised that quota simply keeps a tally of the total space occupied by files by user owner and group owner (true?).
This means that if mike creates a file and is the owner it will be tallied against that user if a quota has been set for them. However the group owner of this file will also default to mike (unless I force group in samba setup or chgroup on a file) so it will not be tallied against say the group standardusers as I intended if I have set up quotas for that group.
The consequence is that merely ensuring that users are members of a group and setting quotas on that group is not sufficient - files created by that user must take on that group membership as well to be tallied. This is no good really as this means that the group quota is a total of space taken up by those files across a set of users - not applied individually. This is also not practical as user owners could change the group owner of a file (I imagine).

I have also found that repquota only reports for a group when there are files with that group owner - it will not report zero use (also true when using 'quota -g standardusers') and this made me think that group quotas were not functioning!

So I would conclude that group quotas are not useful in this form and to apply the same quota across a set of users it is better to do something like this:
edquota -p user1 'awk -F: '$3 > 499 {print$1}' /etc/passwd'
to model users with ID of 500 and above on user1's previously set quota.
(I got this off the web and wouldn't use it unitil I understand it).
Seems like an ugly way to enforce the same quota across a set of users. If I delete a user the quota reference will still be there etc so poor for administration (I don't know how to get a quota removed from aquota.user - not just zeroed)

It would be nice if the writers of quota could give an easy way of managing a group of users with the same quotas.

BTW in The Perfect Server Ubuntu 7.10 it mentions quota.user and quota.group where actually aquota.user and aquota.group are needed (as 7.10 is using version 2 of quota).

Also it would be great if the man page for quota explained the above properly. It is very confusing that repquota and quota don't list where use is zero.

Finally I wonder if anyone has benchmarked quota - does it slow access significantly?
Reply With Quote
  #4  
Old 24th January 2008, 14:58
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

Quote:
Originally Posted by normanp
Finally I wonder if anyone has benchmarked quota - does it slow access significantly?
I haven't done a benchmark, but I haven't noticed any performance impacts yet.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 25th January 2008, 10:21
normanp normanp is offline
Member
 
Join Date: Dec 2007
Posts: 33
Thanks: 5
Thanked 1 Time in 1 Post
 
Default

Have I understood correctly above how quota functions?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Perfect Server - Ubuntu Gutsy Gibbon (Ubuntu 7.10) B767Mike Installation/Configuration 5 18th January 2008 19:16
General Server Setup Questions: southernman Installation/Configuration 2 12th August 2007 13:23
Perfect server setup for 7.04 - no internet valtech Installation/Configuration 2 30th July 2007 13:25
Print Server & Quota Tuxfun HOWTO-Related Questions 12 19th December 2006 11:22
Total Noob just setup first ubuntu server woodies HOWTO-Related Questions 1 19th October 2006 15:04


All times are GMT +2. The time now is 14:42.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.