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.

Changing disk quota for all accounts on a server

Discussion in 'General Discussion' started by morteza, Sep 24, 2010.

  1. morteza

    morteza Member

    Joined:
    Dec 8, 2009
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    I was trying to change the disk quota massively for all accounts, setting them all to let's say 200,000MB. Something simple like this can generate a file like /etc/quota.conf, saved as /etc/newquota.conf:

    # cd /etc; cat /etc/trueuserdomains |awk '{print $2}'|sort| while read u; do echo "$u=200000" >> newquota.conf; chmod 600 newquota.conf; done

    But apparently modifying /etc/quota.conf does not actually change the quota as I checked it from WHM. before running the above, I changed some of /etc/quota.conf entries manually, but it's not shown on WHM. What else should be done to change the quota other than modifying /etc/quota.conf? I appreciate the suggestions or instructions to change the quota for all accounts.
     
  2. bhd

    bhd Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    149
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    JNB ZA
    cPanel Access Level:
    Root Administrator
    Unless you have each account with a different or no package assigned, why not just change the disk quota in the assigned package(s)?
     
  3. morteza

    morteza Member

    Joined:
    Dec 8, 2009
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Yes that's the point; these accounts are moved from a different platform and have no packages identified by cPanel. On the other hand the accounts had different plans and I cannot change them all to one package on cPanel.
     
  4. morteza

    morteza Member

    Joined:
    Dec 8, 2009
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Thanks to Joshua @ cPanel support, the quota can be changed in shell with /scripts/editquota , something like this will change it to 200000MB for all accounts:

    cat /etc/trueuserdomains |awk '{print $2}'|while read u; do /scripts/editquota $u 200000M ; done
     
Loading...

Share This Page