HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=15)
-   -   Statistics admin Bug???? (http://www.howtoforge.com/forums/showthread.php?t=2064)

AlexanderTheGr 14th January 2006 18:41

Statistics admin Bug????
 
I thing this could be a bug.

I have create a new site with 200MB disk space

I loged as user admin to this site and i have uploaded (By using FTP) the site's file (Many pics and sounds available for donwloads) almost 150MB

I checked how many disk space i used to this site. It said me 150MB. All work fine hire.

Now i have changed the permitions to dowloaded directories to 717 and to all downloaded files to 644.

I checked again how many disk space i used to this site. It said me 29MB!!!!. This is not right because i am using 150MB and not 29MB.

I noticed the problem is cause i have chaged the permision specialy the group perimetions. The group permition should be 5 (read and execute) to get the right report.

Off course the quota works fine and it does not allow me to extend the storage limit space... but the report of using space is wronk

I am sure but i think the bandwith report is wronk also.....

PS: Sory about my bad english

Alexander

till 14th January 2006 23:05

There is no bug. If you want to change the permissions of files manually you have to configure the "du" command to be executed with root priveliges by sudo.

Then add the line:

$go_info["server"]["sudo_du_enabled"] = true;

to the file /home/admispconfig/ispconfig/lib/config.inc.php

AlexanderTheGr 15th January 2006 03:29

And how can I do it this step by step? I am using debian

till 15th January 2006 12:48

Sudo installation on debian:

http://www.debianhelp.co.uk/sudo.htm
http://www.linuxmanpages.com/man5/sudoers.5.php

The user admispconfig must be enabled to run the "du" command. I dont have more detailed instructions here for the moment.

AlexanderTheGr 15th January 2006 15:29

It worked thx a lot :D

Ovidiu 9th March 2006 08:54

I already had found that setting for the du sudo :-) but I did not think further so I did not insert admispconfig into sudoers :-(

Now that I read the post you linked to I tried modifying my sudoers like this:
Quote:

admispconfig ALL=NOPASSWD: /usr/bin/du *
I added that line using visudo and tried su admispconfig then du -s -c -h web2/ and here is the output:

Quote:

admispconfig@h5810:/var/www$ du -c -s -h web2
du: ,,web2/web/brasov/php/poll/lang": Keine Berechtigung
du: ,,web2/web/bucuresti/php/poll/lang": Keine Berechtigung
du: ,,web2/web/cluj/php/poll/lang": Keine Berechtigung
du: ,,web2/web/sibiu/php/poll/lang": Keine Berechtigung
du: ,,web2/web/timisoara/php/poll/lang": Keine Berechtigung
du: ,,web2/user/web2_tibi/Maildir": Keine Berechtigung
du: ,,web2/user/web2_info/Maildir": Keine Berechtigung
du: ,,web2/user/web2_info/.spamassassin": Keine Berechtigung
du: ,,web2/user/web2_info/tmp": Keine Berechtigung
du: ,,web2/user/web2_info/.pyzor": Keine Berechtigung
du: ,,web2/user/web2_dark/Maildir": Keine Berechtigung
du: ,,web2/user/web2_timisoara/Maildir": Keine Berechtigung
du: ,,web2/tmp": Keine Berechtigung
du: ,,web2/.spamassassin": Keine Berechtigung
du: ,,web2/.pyzor": Keine Berechtigung
3,9G web2
3,9G insgesamt
admispconfig@h5810:/var/www$
BUT I can get this output even without putting admispconfig into sudoers , strange...

so now that this works, shouldn't ispcfg display the corect values?
well I tried again, the details about the folders file usage is now there, BUT it still says:

Quote:

Storage space: 6000 MB
used: 11015.09k
meaning the folder sizes do not get added up to the total, total still only shows the size of the databases...

###edit###

I noticed it does not work for the largest site, the smaller ones display correct values.
here is the one that does not comply:

Quote:

Storage space: 6000 MB
used: 11015.27k



/web 1,6G
/user 640K
/log 768M
/cgi-bin 4,0K
/ssl 4,0K
/phptmp 4,0K
/backup 1,6G
/tmp 4,0K
/.spamassassin 40K
/.pyzor 8,0K
DB::MySQL 11012.3k

Ovidiu 12th March 2006 13:59

anymore ideas? it seems like the total DB space does not add to the total web space and logs are growing over the fixed size I set in ISPCFG panel

Norman 10th May 2006 19:35

Seems to me that the sudo-check is broken in ispconfig =(

Even though sudo is enabled in /etc/sudoers for admispconfig it doesnt seem to show all the directories in statistics when I've run chmod 701 /var/www/web*

I dont want other users snooping in eachothers directories, and I dont want to have to chroot everyone. Too much overhead.

AlexanderTheGr 27th May 2006 23:00

try this to the sudoers

Code:

admispconfig ALL=NOPASSWD: /usr/sbin/du *

Ovidiu 5th October 2006 13:55

its /usr/bin/du on Debian


All times are GMT +2. The time now is 23:29.

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