[排错] Linux 解决使用 setfacl 命令时报错 “setfacl: …… : Operation not supported”

报错命令

# setfacl ......

报错代码

setfacl: ......: Operation not supported

解决方法

添加 acl 参数

临时解决方法(临时在挂载时添加 acl 参数):

# mount -o remount,acl /mnt

(补充:这里以给挂载的 /mnt 目录添加 acl 参数为例)

永久解决方法(永久在挂载时添加 acl 参数):

# vi /etc/fstab

将部分内容修改如下:

......
/dev/sda5 /mnt xfs defaults,acl 0 0
......

(补充:这里以给从硬盘 /dev/sda5 挂载到 /mnt 目录的目录添加 acl 参数为例)

[DEBUG] Linux resolve error ‘chmod: changing permissions of ‘resolv.conf’: Operation not permitted’

Error Reporting Command

# chmod 644 resolv.conf

Error Code

chmod: changing permissions of 'resolv.conf': Operation not permitted

Analysis

This file is locked by chattr command

Solution

Step One: Cancel the lock

# chattr -i /etc/resolv.conf

Step Two: Change the file’s privilege

# chmod 644 resolv.conf

Step Three: Relock this file

# chattr +i /etc/resolv.conf