Wrong Space in Cpanel/WHM usage

strikinado

Well-Known Member
Apr 28, 2005
71
0
156
Hello, I have a problem, customer can not use their account cause cpanel/ftp/filemanager says: No disk Space.

In Cpanel, show: Used 49/50MB but when click in Show Disk Usage, it show ok, 17MB

In du-h too, show OK, 17MB only

What is the problem?

I have do:
- fixquota
- fixeverything
- quotacheck
- runweblogs

And nothing resolve the problem. Please help.

ty vm
 

rogcan

Well-Known Member
Jun 7, 2004
48
0
156
If that happens to me i just usually run the follwing in SSH:

re-calculate disk & MySql space:
/scripts/fixquotas
/scripts/updatemysqlquota
/scripts/runlogsnow
 

_Sam_

Well-Known Member
Feb 24, 2007
79
0
156
Are you on a VPS by any chance? if so you will have to ask your host to fix quotas
 

strikinado

Well-Known Member
Apr 28, 2005
71
0
156
No, dedicated server.

I have do it, but without success:

/scripts/fixquotas
/scripts/updatemysqlquota
/scripts/runlogsnow

Please, Help
 

shopcentar

Well-Known Member
PartnerNOC
Jul 10, 2004
55
1
158
run

/scripts/fixeverything

and after this process finish

restart your server and then again run

/scripts/fixeverything

this procedure fix our problem for some accounts that show wrong qouta.

bye, SC
 
Last edited:

ttk_2k

Well-Known Member
Jan 22, 2005
45
0
156
I too have the same issue, any help?? I'm with CPanel 11

EDIT: I've tried all above methods without luck.

EDIT2: I see the major issue is from the .ftpquota file under the FTP account folder, .ftpquota doesn't update itself.
 
Last edited:

Silver_2000

Well-Known Member
Mar 31, 2002
337
1
318
Disk space has been broken in Cpanel for years

The disk space in use is ALWAYS more than is reflected in Cpanel and the amount reflected in CPanel is typically less than what appears in WHM - I have run the various scripts over the years and finally just accepted that its OFF ... And will continue to be off

I have an account now that has ~300mb of photos in the photo galley - CPanel says the account conatins 153 mb of space - whm says 415 ... 415 is likely closer to the truth

The disk space usage on the Cpanel home page with the bar graph shows 153 - if you click the Disk Space Usage link to see the details - it shows 454.49 Meg - So now we have 4 wrong answers

at least they admit it
Please note that this number does not include files outside your home directory. This will show a different usage number than the statistics on the main screen of your interface.
 

cPanelNick

Administrator
Staff member
Mar 9, 2015
3,488
35
208
cPanel Access Level
DataCenter Provider
cPanel and WHM will display the quota data from the system.


The diskusage function in cPanel is however limited to your home directory for security reasons.


You should be able to find files owned by a user outside of their homedir by running

find / -user <usernamehere>
 

ttk_2k

Well-Known Member
Jan 22, 2005
45
0
156
Ok, this is the story:

I created an FTP account on my shared hosting account for Jon with username jon to folderA, and it generates a file .ftpquota under folderA. Right now the diskspace is correct, it shows Jon has used 0 MB.

Jon uploads 2 files to his account, both are 10 MB. At this time the diskspace shows correctly, it shows on cPanel that Jon has used 20 MB disk space.

Now Jon deletes 1 file by himself. At this time the diskspace shows STILL correctly, it shows on cPanel that Jon has used 10 MB disk space (after the file deleted).

Now look, I log into my FTP as administrator, I mean I am manipulating files on Jon's folder (actually a subfolder 'folderA' under my root) but without using Jon's FTP account, I delete the last file (10 MB) there. By this time there should be no more files in the folder since all files have been deleted, and the diskspace should be 0 MB used, but cPanel still shows Jon has used 10MB of diskspace.

If you delete Jon's file on cPanel File Manager, you get the same result, whatever you do to Jon's folder will not reflect to the diskspace usage of Jon's FTP account.

The only way to make Jon's diskspace usage go to 0 now is to delete .ftpquota, it will be generated again when next time Jon logs into his FTP account.

Now look, another funny thing:

Jon now is trying to upload a file with (again) 10MB, the network suddenly broken when 7MB is uploaded, so Jon has to re-connect and re-upload, after the file is successfully uploaded, you will see on cPanel, it shows that Jon has used 17MB of diskspace.


Please tell me if it's just my problem or everyone is facing the same thing.
 
Last edited:

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,608
77
458
cPanel Access Level
Root Administrator
That's how ftp quotas work. You would get the same results if you SSH into the account and delete files from the folder. Pure-FTPd (if that is the one you are doing) is what controls the ftp quota and will only update the .quota file for the account(s) currently logged in.
 

ttk_2k

Well-Known Member
Jan 22, 2005
45
0
156
Oh, that sounds warm.. yes I'm using Pure-FTPd, so it seems it's not a bug.. good good :D thank you
 
Last edited:

MaraBlue

Well-Known Member
May 3, 2005
334
2
168
Carmichael, CA
cPanel Access Level
Root Administrator
That's how ftp quotas work. You would get the same results if you SSH into the account and delete files from the folder. Pure-FTPd (if that is the one you are doing) is what controls the ftp quota and will only update the .quota file for the account(s) currently logged in.
What about when an account hasn't been ftp'ed into for a while...and yet every night in the upcp email there's:

Ftp Quota Check v1.6
Updating user1: ...Done
Updating user2: ...Done
Updating user3: ...Done
...Done


I know because user1 and user3 are two of my accounts. I login to user3 account's cpanel, but I can't remember the last time I logged in via FTP. .ftpquota's time stamp is Oct 31 @ 22:45 (which also happens to be the time when upcp runs). And yet, every night it "updates" FTP quota.

To add further confusion....other user accounts, who ARE using FTP on their accounts...neither have .ftpquota nor show up in the "FTP Quota Check" in upcp.

I realize, that in the general scheme of things (and on my own personal list of potential cpanel bugs and other annoyances), this is pretty low priority...but it's been bugging me for nearly a year, because I can see no rhyme nor reason to it.
 

plague

Well-Known Member
Sep 22, 2006
76
17
158
Brasil
cPanel Access Level
Root Administrator
Twitter
No, dedicated server.

I have do it, but without success:

/scripts/fixquotas
/scripts/updatemysqlquota
/scripts/runlogsnow

Please, Help
Try this:

cd /
find -user "user" -ls

This will show all the files owned by the user that you specify in "user". Sometimes some files are lost in the system, and cPanel uses it to calculate de disk space because this files are owned by the user account. I.E. file in the /tmp directory or other temporary files.

We have many servers with RoundCube, and sometimes email files created by the RoundCube app causes this problem, and needs to be deleted by root.

Sorry about my English. I hope this helps.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,608
77
458
cPanel Access Level
Root Administrator
What about when an account hasn't been ftp'ed into for a while...and yet every night in the upcp email there's:

Ftp Quota Check v1.6
Updating user1: ...Done
Updating user2: ...Done
Updating user3: ...Done
...Done


I know because user1 and user3 are two of my accounts. I login to user3 account's cpanel, but I can't remember the last time I logged in via FTP. .ftpquota's time stamp is Oct 31 @ 22:45 (which also happens to be the time when upcp runs). And yet, every night it "updates" FTP quota.

To add further confusion....other user accounts, who ARE using FTP on their accounts...neither have .ftpquota nor show up in the "FTP Quota Check" in upcp.

I realize, that in the general scheme of things (and on my own personal list of potential cpanel bugs and other annoyances), this is pretty low priority...but it's been bugging me for nearly a year, because I can see no rhyme nor reason to it.
The script /scripts/ftpquotacheck is what generates the output. Persuing it reveals you will only see Updating user1:... if the following criteria are met:

1. /home/user1/etc/ftpquota exist
2. /etc/proftpd/user1 exists

If the process progresses beyond that, then the existence of .ftpquota is checked (the exact location depends upon the location of the home directory as found in /etc/proftpd/user1). If it doesn't exist, it should be created with the pure-quotacheck program. If .ftpquota does exist, then it is updated with current disk usage of ftphome and below.

Hopefully, that simple analysis will give you a starting point for local examination.
 

MaraBlue

Well-Known Member
May 3, 2005
334
2
168
Carmichael, CA
cPanel Access Level
Root Administrator
The script /scripts/ftpquotacheck is what generates the output. Persuing it reveals you will only see Updating user1:... if the following criteria are met:

1. /home/user1/etc/ftpquota exist
2. /etc/proftpd/user1 exists

If the process progresses beyond that, then the existence of .ftpquota is checked (the exact location depends upon the location of the home directory as found in /etc/proftpd/user1). If it doesn't exist, it should be created with the pure-quotacheck program. If .ftpquota does exist, then it is updated with current disk usage of ftphome and below.

Hopefully, that simple analysis will give you a starting point for local examination.
Sorry for the late reply...I never got the notification you'd replied. As for the 2 criteria you mentioned:

#1 exists but not in the "etc" directory but the root, though I keep deleting "ftpquota", it's always recreated. These users do not have any sort of quota set for ftp.

To add further confusion there are other users who have ".ftpquota" in their root directory as well, and "ftpquotacheck" hasn't checked their accounts.

#2 exists, but *all* users are listed there.

So again, I'm confused why all users (including the ones that are getting "quotachecked") are listed under something associated with ProFTP, since I only have Pure-FTP enabled.

I see from the (ftpquotacheck) that's one of the places the script checks, so...perhaps I just need to edit or disable it.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,608
77
458
cPanel Access Level
Root Administrator
/etc/proftpd contains the login information for both ProFTP and Pure-FTPd. Deleting it is not conducive to your FTP sanity :)

So, you are saying you have /etc/ftpquota, but not /home/user1/etc/ftpquota? What are the contents of /etc/ftpquota? Is it similar to this:

Code:
ftp:38797312
tramel_logs:104857600
mister:367001600
my_account:10485760
Similar means follows the above format, not necessarily the same data.
 

MaraBlue

Well-Known Member
May 3, 2005
334
2
168
Carmichael, CA
cPanel Access Level
Root Administrator
/etc/proftpd contains the login information for both ProFTP and Pure-FTPd. Deleting it is not conducive to your FTP sanity :)
*ahem*

So I discovered....I mean, so I hear. Word on the street and all.
Luckily I didn't delete, I did the old "mv dir dir.old" trick. Then I did the panic because I can't connect via FTP, move back and reinstall trick. Lesson learned. S'Ok...you can laugh now :p

So, you are saying you have /etc/ftpquota, but not /home/user1/etc/ftpquota? What are the contents of /etc/ftpquota? Is it similar to this:

Code:
ftp:38797312
tramel_logs:104857600
mister:367001600
my_account:10485760
Similar means follows the above format, not necessarily the same data.
Initially, I thought it was reverse, that there was no /etc/ftpquota, since what I thought I was looking for was the dot file, .ftpquota. Those are scattered all over the place. I delete those, they get recreated.

I had been relying on using slocate to find the files, but I could swear I spotchecked some users' /home/user/etc dirs, also, and found no ftpquota, dot or otherwise.

I *know* this is a really silly, insignificant thing to be trippin on. I'm just curious as all heck why *only* a handful of user's accounts (including 2 of mine) are being "flagged" by ftpquotacheck. Other account users use FTP, and one of the accounts being singled out by ftpquotacheck hasn't been accessed in months, so there's no FTP usage to "update."

I deleted all the ftpquota's, so we'll see what happens after 10:45pm PST when upcp runs. And chksrvd restarts without a hitch.