![无法在 RHEL6 和 CentOS6 中配置配额 - quotecheck 返回错误消息](https://linux22.com/image/644180/%E6%97%A0%E6%B3%95%E5%9C%A8%20RHEL6%20%E5%92%8C%20CentOS6%20%E4%B8%AD%E9%85%8D%E7%BD%AE%E9%85%8D%E9%A2%9D%20-%20quotecheck%20%E8%BF%94%E5%9B%9E%E9%94%99%E8%AF%AF%E6%B6%88%E6%81%AF.png)
无法在 RHEL6 和 CentOS6 中配置配额 - quotecheck 返回错误消息
我已经创建了新的分区(/dev/sda6)并将其安装(在/hulk 上)。
编辑 /etc/fstab 文件,使用以下行对分区进行配额设置
/dev/sda6 /hulk ext4 defaults,usrquota,grpquota 0 0
并给出以下命令
[root@localhost ~]# mount -o remount,rw /hulk
[root@localhost ~]# mount|grep hulk
/dev/sda6 on /hulk type ext4 (rw,usrquota,grpquota)
[root@localhost ~]# cd /hulk
[root@localhost hulk]# ls
lost+found
当我使用quotacheck命令时,它给出了以下错误消息
[root@localhost hulk]# quotacheck -cug /hulk
quotacheck: Cannot create new quotafile /hulk/aquota.user.new: Permission denied
quotacheck: Cannot initialize IO on new quotafile: Permission denied
quotacheck: Cannot create new quotafile /hulk/aquota.group.new: Permission denied
quotacheck: Cannot initialize IO on new quotafile: Permission denied
答案1
在运行配额检查命令之前,您需要禁用 SELinux。运行以下命令:
[root@localhost hulk]# setenforce 0
现在执行配额检查命令:
[root@localhost hulk]# quotacheck -cug /hulk