October 5, 2015

Lab 13.2: Filesystem Quotas

I had an issue on CentOS 6.5: after changing noexec to usrquota in /etc/fstab and remounting the fs under /mnt/tempdir, when i run sudo quotacheck -u /mnt/tempdir I got this error
quotacheck: Cannot create new quotafile /mnt/tempdir/aquota.user.new: Permission denied
quotacheck: Cannot initialize IO on new quotafile: Permission denied

It seams to be related to SELinux permissions for that directory.
One solution, aside the one setting SELinux to permissive, came from http://www.unix.com/red-hat/176845-user-group-quota-not-working-rhel6-2-... : change context of the /mnt/tempdir
# chcon --reference=/var /mnt/tempdir

In my case it worked.
Hope this helps someone encountering the same problem.

Click Here!