Issue :

Quotas not working for accounts on a VPS

Running /scripts/fixquotas returned the following :

root@server [~]# /scripts/fixquotas
Installing Default Quota Databases……Done
Quotas are now on
Resetting quota for rockyour to 1024 M
edquota: Quota file not found or has wrong format.
No filesystems with quota detected.
Resetting quota for openhelp to 5120 M
edquota: Quota file not found or has wrong format.
No filesystems with quota detected.

Fix :

Try the following :

1. Make sure that quota is enabled for all  accounts through  the server WHM.

2. Check the disk usage.

root@server [~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/simfs 7.0G 4.5G 2.6G 64% /

3. Check all the mounted devices.

root@server [~]# mount

/dev/simfs on / type reiserfs (rw,usrquota,grpquota)
/proc on /proc type proc (rw)
/sys on /sys type sysfs (rw)
none on /dev/pts type devpts (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

root@server [~]# mount -a

4. Issue the following command to check quota.

root@server [~]# quotacheck -vm /dev/simfs ( Check the mount point. Some times it may be /dev/hda1,/dev/hda2 etc)

quotacheck: Scanning /dev/simfs [/] quotacheck: Cannot stat old user quota file: No such file or directory
quotacheck: Cannot stat old group quota file: No such file or directory
done
quotacheck: Checked 12082 directories and 143647 files
quotacheck: Old file not found.

5. Check the permissions for the /aquota.user file.

root@server [~]# ll /aquota.user
-rw——- 1 root root 13312 Feb 3 03:48 /aquota.user

Here, the file permissions are wrong. It should have 744 permissions.
Change the permissions.

root@server [~]# chmod 744 /aquota.user
[root@server ~]# ll /aquota.user
-rwxr–r– 1 root root 46080 Feb 3 20:57 /aquota.user

6. Run /scripts/fixquotas

root@server [~]# /scripts/fixquotas
Installing Default Quota Databases……Done
Quotas are now on
Resetting quota for account1 to 1024 M
Resetting quota for account2 to 5120 M

7. Now, check the quota for any account.

root@server [~]# quota -s test
Disk quotas for user test (uid 513):
Filesystem blocks quota limit grace files quota limit grace
/dev/simfs 392 1024M 1024M

The issue should be fixed!

Read our latest posts:-

Top things to consider before DevOps implementation

The future prospects of Managed IoT Services

Why do you need Managed IT Services for your Business?

Instacarma offers the best outsourced web hosting technical support  for more details contact us.


Shares
Contact Us On WhatsApp