wonfen:macOS 卷「忽略所有权」导致 Clash Verge Rev 服务拒绝应用数据目录,并给出排查与修复命令
在 macOS 服务拒绝外部 APFS 卷上迁移后的 home 目录(code 1001)的反馈中,wonfen 说明服务会以 root 身份检查应用数据目录是否归当前账户所有:若文件是在该卷开启「忽略此卷上的所有权」期间创建的,会被存为 uid 99(_unknown)。macOS 对所有非 root 用户都把这些文件显示为属于自己的,因此 ls -l 看起来正常,但以 root 运行的服务看到的是 uid 99;这样的目录可被本机任意账户修改,服务必须拒绝它。他请报告者执行 stat -f '%u %Su' "$HOME/Library/Application Support/io.github.clash-verge-rev.clash-verge-rev",再以 sudo 执行同一条并对比 id -u 确认:若 sudo 那行输出 99 _unknown(或任何非本人 uid),可用 sudo chown -R "$(id -u):$(id -g)" 该目录修复,然后重启应用。下一个版本会在错误信息中写明该目录名及其属主,并在应用内显示这条命令。
作者原文@wonfenThanks for the detailed report. The service checks that the app data folder is owned by your account as root sees it.
On macOS, files created while a volume had "Ignore ownership on this volume" enabled are stored with uid 99 (_unknown).
macOS shows such files to every non-root user as their own, sols -llooks correct, but the service (root) sees uid 99.
A folder like that can be modified by every local account, so the service has to refuse it.Could you run this to confirm?
D="$HOME/Library/Application Support/io.github.clash-verge-rev.clash-verge-rev" stat -f '%u %Su' "$D"; sudo stat -f '%u %Su' "$D"; id -uf the
sudoline prints99 _unknown(or any uid other than yours), this fixes it:sudo chown -R "$(id -u):$(id -g)" "$D"Then restart Clash Verge Rev. The next release names the folder and its owner in the error and shows this command in the app.