gpt4 book ai didi

unix - ls : Operation not Permitted

转载 作者:行者123 更新时间:2023-12-04 23:27:01 27 4
gpt4 key购买 nike

我有一个运行带有选项 allow_other 和 umask 0 的 fuse fs。这给了我一组权限设置为 777 的文件。虽然当我尝试 ls -l 时在包含文件的目录中,我得到以下输出:

ls: name: Operation not permitted
ls: tags: Operation not permitted
ls: location: Operation not permitted
ls: ext: Operation not permitted
ls: experiment_id: Operation not permitted
ls: file_path: Operation not permitted

谁能告诉我为什么尽管拥有全局权限 (777) 我仍然不允许操作?

在运行 strace 时,我得到以下跟踪:
lstat("tags", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
lgetxattr("tags", "security.selinux", 0x112ae80, 255) = -1 EPERM (Operation not permitted)
write(2, "ls: ", 4ls: ) = 4
write(2, "tags", 4tags) = 4
write(2, ": Operation not permitted", 25: Operation not permitted) = 25
write(2, "\n", 1
) = 1
lstat("location", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
lgetxattr("location", "security.selinux", 0x112aea0, 255) = -1 EPERM (Operation not permitted)
write(2, "ls: ", 4ls: ) = 4
write(2, "location", 8location) = 8
write(2, ": Operation not permitted", 25: Operation not permitted) = 25
write(2, "\n", 1) = 1
lstat("ext", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
lgetxattr("ext", "security.selinux", 0x112aec0, 255) = -1 EPERM (Operation not permitted)
write(2, "ls: ", 4ls: ) = 4
write(2, "ext", 3ext) = 3
write(2, ": Operation not permitted", 25: Operation not permitted) = 25
write(2, "\n", 1) = 1
lstat("experiment_id", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
lgetxattr("experiment_id", "security.selinux", 0x112aee0, 255) = -1 EPERM (Operation not permitted)
write(2, "ls: ", 4ls: ) = 4
write(2, "experiment_id", 13experiment_id) = 13
write(2, ": Operation not permitted", 25: Operation not permitted) = 25
write(2, "\n", 1) = 1
lstat("file_path", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0
lgetxattr("file_path", "security.selinux", 0x112af00, 255) = -1 EPERM (Operation not permitted)
write(2, "ls: ", 4ls: ) = 4
write(2, "file_path", 9file_path) = 9
write(2, ": Operation not permitted", 25: Operation not permitted) = 25
write(2, "\n", 1) = 1

因此,从跟踪来看,它似乎试图获取 selinux 属性,即使它在我的系统上被禁用。
cat /etc//sysconfig/selinux
SELINUX=disabled
SELINUXTYPE=targeted

最佳答案

请按照以下步骤解决问题。我尝试了以下步骤,对我有用
1.下拉Apple菜单并选择“系统偏好设置”
2.选择“安全和隐私”控制面板
3.现在选择“隐私”选项卡,然后从左侧菜单中选择“完整磁盘访问”
4.单击首选项面板左下角的锁图标并使用管理员级别登录进行身份验证
5.现在单击[+]加号按钮添加具有全盘访问权限的应用程序
6.导航到/Applications/Utilities/文件夹并选择“终端”以授予具有全盘访问权限的终端
7.重新启动终端,“不允许操作”错误信息将消失

关于unix - ls : Operation not Permitted,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25717501/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com