PDA

View Full Version : Solution: for those troubled with WHM Quota computation "Free fix"


eMax
05-09-03, 05:48 AM
I posted this at WHT but thought Id also post it here as many people may have this trouble. I know it drove me crazy. Anyways here yah go.....

After spending countless nights and going back and forth with Darren at cpanel we have both figured it out (well mainly him, But I need some credit for the frustration)

Basically I have a few customers that are using scripts to upload files, pictures ec. ec.

When customers do this it causes the folder or files to be owned by "Nobody". Here is a quote from darren about one of my customers:

Hello,

It looks like they are actually uploading the files using scripts on the server. Since (the highly experimental) phpsuexec is not installed into apache on the server, all the files are owned by the user "nobody".

[/home/customer_name/public_html/crack/albums]# ll
total 656
drwxrwxrwx 125 customer_name customer_name 4096 May 5 10:26 ./
drwxr-xr-x 16 customer_name customer_name 4096 May 8 17:36 ../
-rw-r--r-- 1 nobody nobody 3512 May 5 10:17 albumdb.dat
-rw-r--r-- 1 nobody nobody 3512 May 5 10:17 albumdb.dat.bak
-rw-r--r-- 1 nobody nobody 0 Apr 29 13:14 albumdb.dat.lock
drwxrwxr-x 2 nobody nobody 4096 May 8 20:04 file_name/
drwxrwxr-x 2 nobody nobody 8192 May 8 20:10 file_name/
drwxrwxr-x 2 nobody nobody 8192 May 8 20:10 file_name/
drwxrwxr-x 2 nobody nobody 4096 May 8 20:12 file_name/
drwxrwxr-x 2 nobody nobody 4096 May 8 20:07 file_name/
...

If the scripts still work when the files are owned by the user (they should), you can do a recursive chown on the public_html directory for the user.

Thanks,
Darren


so what I had to do via SSH is the following:



Hello,

For this user, doing this should return quotas to values you'd expect:

cd /home/customer_name/public_html/crack/
chown -R customer_name:customer_name ./

Any user that uploads their files using php scripts (php scripts run as the same user apache runs as, nobody) the files will be owned by the user nobody. You can keep an eye on how much space that user is using the following command

repquota -a|grep ^nobody

Thanks,
Darren

I ran that and everything is correct now. I hope this helps others out as it did me.
Take care all :D