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.

Unable to read /etc/quota.conf at /scripts/resetquotas line 23

Discussion in 'General Discussion' started by HostingZero.com, Apr 3, 2007.

  1. HostingZero.com

    HostingZero.com Active Member

    Joined:
    Jun 23, 2005
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Recently one of our servers suffered a hard disk failure. I copied everything to the new drive except quota.conf. Now, I don't have any access to quota.conf on the old hard drive. How can I reset everyone's quota to their plan's default? I tried modifying an account's quota, it said "The quota has been set to xxx" but when I check the account again, it still says "Unlimited" disk space.

    Can anyone help please?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    There are a couple of issues:

    1. Recreate /etc/quota.conf:

    The file should be owned by root and chmod 644. Recreate it in the following format:
    account=quota

    Where account is the accountname and quota is the value in megabytes.

    2. Make sure the OS quotas are actually working

    Run /scripts/fixquotas this will check that the OS quotas are running and will also run /scripts/resetquotas which reads the quota.conf file

    I'll also attach a perl script that I wrote that will recreate the quota.conf file with the default quotas for the users package so long as they have been set up correctly.
     

    Attached Files:

  3. HostingZero.com

    HostingZero.com Active Member

    Joined:
    Jun 23, 2005
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Thanks so much! That worked well. Much appreciated :)
     
Loading...

Share This Page