The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Quota Understanding and datastore/_usr_local_cpanel_bin_quota_*cpanelusername*

Discussion in 'General Discussion' started by cobi10, Jun 20, 2014.

  1. cobi10

    cobi10 Member

    Joined:
    Jun 20, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    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
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  3. cobi10

    cobi10 Member

    Joined:
    Jun 20, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    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.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  5. cobi10

    cobi10 Member

    Joined:
    Jun 20, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    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
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    No, you would not have to grant cPanel users any additional access. Authentication is possible with their standard cPanel login details.

    Thank you.
     
  7. cobi10

    cobi10 Member

    Joined:
    Jun 20, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    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?
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Is the "diskusage" parameter referenced in the document I provided helpful?

    Thank you.
     
  9. cobi10

    cobi10 Member

    Joined:
    Jun 20, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    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.
     
Loading...

Share This Page