我通过 ssh 连接到本地 Centos 7 docker 容器 * 并且我正在尝试运行
sudo chattr +i file1
Run Code Online (Sandbox Code Playgroud)
但我收到一个错误:
chattr: Operation not permitted while setting flags on file1
Run Code Online (Sandbox Code Playgroud)
这里发生了什么?它在谈论什么旗帜?有解决方法吗?
更改+i
为+a
也会使命令因该错误而失败,但是当我将其更改为+d
命令时成功。当我没有通过 ssh 连接到 docker 容器时,该命令也对我成功。
*我在 Windows 10 之上的 Ubuntu VirtualBox VM 主机中运行 Centos 7 docker 容器(我想避免尽可能多地处理 Windows)。所有这一切的最终目标是使用这些容器测试一些 Ansible 脚本。