After the modification of your /etc/fstab file, in order for quotas to be established on a file system, the root directory of the file system i.e. /home in
our example must contain a file, owned by root, called quota.user if you want to use user quota, quota.group if you want to use group quota, or both if you want to use users and group quota.
Create the
quota.userand/orquota.groupfiles, as root go to the root of the partition you wish to enable quota i.e./homedoing:[root@deep] /# touch /home/quota.user [root@deep] /# touch /home/quota.group [root@deep] /# chmod 600 /home/quota.user [root@deep] /# chmod 600 /home/quota.groupThe touch command will create new empty files under the
homedirectory namedquota.userandquota.group. The chmod command will set the mode of these files to be read-write only by the super-user root.
Both quota record files,
quota.userandquota.group, should be owned by root, with read-write permission for root and none for anybody else.Now we must initialize the files
quota.userandquota.groupin the root directory of the file system in order to not receive an error messages about quota during the reboot of our server. To initializequota.userand/orquota.groupfiles, use the following commands:[root@deep] /# edquota -u wahib [root@deep] /# edquota -g wahibThe steps above are necessary just to initialize the files
quota.userand/orquota.group; the command edquota -u will edit the quota for the user wahib and -g will edit the quota for the group wahib. Note that you must edit an existing UID/GID on your system to initialize the files successfully.After you have finished setting the appropriate options for your quota program in the
/etc/fstabfile, and created and initialized thequota.users, and/orquota.groupfiles, you must reboot the system for the changes you have made in the/etc/fstabfile and/or the filesquota.user,quota.groupto take effect. To reboot your system, use the following command:[root@deep] /# reboot
After your system has been rebooted you can assign quotas to users or groups of users on your system. This operation is performed with the edquota command. See man page edquota(8)