用 ls -le 查看 macOS 文件 ACL
查看普通 ls -l 和 Unix chmod 看不到的扩展 ACL 条目与文件标志。
运行 `ls -le <路径>` 逐条显示 ACL,用 `chmod -a# 0 <文件>` 删除第一条 ACL 条目。
01命令
命令
$ ls -le ~/Downloads/shared_folder02作用说明
macOS 在标准权限之上还叠加了 POSIX 式 ACL 和 BSD 文件标志(uchg、schg);ls 输出中的 + 表示存在 ACL,@ 表示存在扩展属性。这些条目常用来解释"共享过的文件夹为什么所有人仍有权限"或"看起来可写却删不掉的文件"。macOS 的 chmod 还支持 `chmod +a "everyone allow read"` 这类 Linux 上没有的 ACL 语法。
03风险
04撤销
撤销
$ chmod -N <file> (removes all ACLs)05来源
- macOS ls — list directory contents依据: Documents ls -e/-O printing of ACLs and flags on macOS.
最后验证: 2026-09-17 · 分类: 文件与文件夹