Done some more testing, this is what i've found so far :
When I add the line :
admispconfig ALL=(root) NOPASSWD:/usr/bin/du
to my visudo file and run the command you suggested Till, I still don't seem to have permission to the maildir files, getting this :
Quote:
bash-3.2$ du -h --max-depth=1
4.0K ./ssl
4.0K ./phptmp
20K ./log
152K ./web
4.0K ./cgi-bin
du: cannot read directory `./user/mydomain.com_admin/Maildir': Permission denied
du: cannot read directory `./user/mydomain.com_admin/.spamassassin': Permission denied
du: cannot read directory `./user/mydomain.com_user1/Maildir': Permission denied
du: cannot read directory `./user/mydomain.com_user1/.spamassassin': Permission denied
du: cannot read directory `./user/mydomain.com_user2/Maildir': Permission denied
du: cannot read directory `./user/mydomain.com_user2/.spamassassin': Permission denied
du: cannot read directory `./user/mydomain.com_user3/Maildir': Permission denied
du: cannot read directory `./user/mydomain.com_user3/.spamassassin': Permission denied
524K ./user
724K .
|
Which is exactly the same as I get without that line in visudo.
Also what I've noticed is it seems to be this line that totally blanks out the diskspace :
$go_info["server"]["sudo_du_enabled"] = 0; // enable sudo for gathering website file usage
When I change that to a 1 instead of the 0, then my stats don't show anything at all except the mysql data.