Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Feature Requests

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 14th April 2006, 16:17
hastlaug hastlaug is offline
Member
 
Join Date: Apr 2006
Posts: 30
Thanks: 0
Thanked 1 Time in 1 Post
Default "Better" quota usage display

Until now the space consumed by mailboxes (at least in maildir mode) is not shown in the domain statistics. I've read before that this is caused by file permissions. Of course these permissions should stay as they are, because mails should stay private.

My suggestion: Making use of the output of the quota command.
Problem: Only root can view all users' quotas.
Options: Run quota as root or run quota as one of the domain's users.

I know this isn't that easy, especially because making quota suid root wouldn't be that nice...

But it is possible to grant root-access to quota without opening it to everyone.

Simply create some script, e.g. /usr/local/bin/suid_quota:
Code:
#!/bin/sh

if [ "$1" == "somepassword" ]
then
  /usr/bin/quota $2 $3 $4 $5 $6
fi
Then execute:

Code:
# chmod ug+s /usr/local/bin/suid_quota
# chmod go-r /usr/local/bin/suid_quota
# chgrp www-data /usr/local/bin/suid_quota
After that you can query all quotas by using /usr/local/bin/suid_quota if you provide the hardcoded password as first parameter to the script.

If this would be integrated into ISPConfig, of course every server should have it's own password. Possible way to achieve this: Simply generate a random password in setup, paste it into this script and also save it in the database (or any config file) that ISPConfig knows it when a query has to be made.

Btw.: I use this construction to enable Horde IMP to show up quotas, and until now it just works fine.
Reply With Quote
Sponsored Links
  #2  
Old 18th April 2006, 22:53
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
 
Default

There is already a builtin solution in ISPConfig:

http://www.howtoforge.com/forums/showthread.php?t=2064

This requires that the "du" command can be run with "sudo" by the admispconfig user with root priveliges.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
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
quota and ispcfg related question Ovidiu Installation/Configuration 5 10th January 2008 14:24
Quota on JFS raid1 problem- cant find filesystem Chaoticmass Server Operation 2 19th March 2006 23:03
quota WARNING during configuration badgerbox76 Installation/Configuration 2 18th March 2006 11:12
Perfect Installation Fedora Core 4 cybereatl Installation/Configuration 30 8th March 2006 04:42
Syntax error in Quota? st2xo Installation/Configuration 2 13th February 2006 11:30


All times are GMT +2. The time now is 05:49.


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