Quota Understanding and datastore/_usr_local_cpanel_bin_quota_*cpanelusername*
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
-
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: quota username
Thank you.0 -
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 ", cause this process is afaik run with user rights and they cannot run quota (?). Greetings [COLOR="silver">- - - 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. 0 -
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. 0 -
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 0 -
No, you would not have to grant cPanel users any additional access. Authentication is possible with their standard cPanel login details. Thank you. 0 -
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? 0 -
Is the "diskusage" parameter referenced in the document I provided helpful? [QUOTE] 'diskusage' => Information about how much disk space your website is using.
Thank you.0 -
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. 0
Please sign in to leave a comment.
Comments
8 comments