Quota Understanding and datastore/_usr_local_cpanel_bin_quota_*cpanelusername*

cobi10

Member
Jun 20, 2014
6
0
1
cPanel Access Level
DataCenter Provider
Dear cPanel Community,

can somebody explain me the Quota Cron Job handling done by cPanel. My Problem is I like to read as a customer the current quota settings from my vHost. I first thought I can read and parse the datastore/_usr_local_cpanel_bin_quota_*cpanelusername* file in the .cpanel directory, but unlikely this file is not updated if I change the Quota Settings for the cpanel user account. :(

I have also played with the Tweak Settings, turned Quota caching on or off and set the priority of the quota process to 3 (instead of default 6). But no changes take affect. Can someone tell me if such a thing like reading the quota limit as no root user is possible? (without any shell access of course).

Thank you for your Help

Cobi10
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello :)

Could you clarify which data you are looking for in particular? For instance, if it's just the account quota, you could use a command such as:

Code:
quota username
Thank you.
 

cobi10

Member
Jun 20, 2014
6
0
1
cPanel Access Level
DataCenter Provider
Hello :)

thx for your fast response. I've tried this the problem is I want to read the quota as a cpanel user with no shell access in php for example. There I cannot execute the command "exec quota <username>", cause this process is afaik run with user rights and they cannot run quota (?).

Greetings

- - - Updated - - -

PS: In Detail I like to use the quota infos to cover the problem with the php function "disk_free_space" which does ignore any quota settings and always show the full disk free space which is mounted.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
You could try parsing the data from the output of the StatsBar data using our API2 functionality. The following documents should be helpful:

cPanel API2 - StatsBar

Thank you.
 

cobi10

Member
Jun 20, 2014
6
0
1
cPanel Access Level
DataCenter Provider
But for this feature, If I am understanding the documentation right, I must grant every cPanel user who wanted to read his quota via php the API Access?

Thank you
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
No, you would not have to grant cPanel users any additional access. Authentication is possible with their standard cPanel login details.

Thank you.
 

cobi10

Member
Jun 20, 2014
6
0
1
cPanel Access Level
DataCenter Provider
Ok but in statusbar there is not the disk size? To get the disk free space for an user account I needed to do:

max_quota - disk_usage

disk_usage can be done as a user by exec("du -s ."); But I can't find a way to display the quota Limit for an user?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Is the "diskusage" parameter referenced in the document I provided helpful?

'diskusage' => Information about how much disk space your website is using.
Thank you.
 

cobi10

Member
Jun 20, 2014
6
0
1
cPanel Access Level
DataCenter Provider
Unfortunately not. I need something like the Disklimit parameter of the Account Summary Call of the XMLjson API. But it would be very nice to get the disklimit information without any api calls.