# Check quota and then turn quota on.
if [ -x /usr/sbin/quotacheck ]
then
echo "Checking quotas. This may take some time."
/usr/sbin/quotacheck -avug
echo " Done."
fi
if [ -x /usr/sbin/quotaon ]
then
echo "Turning on quota."
/usr/sbin/quotaon -avug
fi
The golden rule is that always turn quota on after your file systems in
/etc/fstab have been mounted, otherwise quota will fail to work. I recommend
turning quota on at the end of your system init script, or, if you like, right
after the part where file systems are mounted in your system init script.