我无法 rm -rf 此目​​录权限被拒绝,即使我有权限 WSL2 ubuntu

我无法 rm -rf 此目​​录权限被拒绝,即使我有权限 WSL2 ubuntu

因此,Mason 有这个位置~/.local/share/nvim/mason/.packages 可以正确安装软件包,显然它需要能够删除此文件夹中的内容

但是我的用户没有权限删除它,因为手动删除rm -rf .packages会返回以下错误:

rm: cannot remove '.packages/typescript-language-server/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json': Permission denied
rm: cannot remove '.packages/typescript-language-server/node_modules/typescript/lib/lib.es2020.date.d.ts': Permission denied
rm: cannot remove '.packages/typescript-language-server/node_modules/typescript/lib/lib.es2017.object.d.ts': Permission denied
rm: cannot remove '.packages/typescript-language-server/node_modules/typescript/lib/lib.es2023.array.d.ts': Permission denied
rm: cannot remove '.packages/typescript-language-server/node_modules/typescript/lib/lib.webworker.iterable.d.ts': Permission denied
rm: cannot remove '.packages/typescript-language-server/node_modules/typescript/lib/lib.es2015.d.ts': Permission denied
rm: cannot remove '.packages/typescript-language-server/node_modules/typescript/lib/lib.es2017.string.d.ts': Permission denied

然而我已经使用过:sudo chown cyneptic:cyneptic .packages- 来获得烫发,并且烫发显示 drwxr-xr-x 7 cyneptic cyneptic 4096 Apr 14 01:32

但我无法将其删除,因为它是恶意的。

waltinator 的 pathlld 输出:

drwxr-xr-x 19 root root 4096 Apr 14 09:42 /
/dev/sdb on / type ext4 (rw,relatime,discard,errors=remount-ro,data=ordered)
drwxr-xr-x 3 root root 4096 Apr 13 18:02 /home
drwxr-x--- 13 cyneptic cyneptic 4096 Apr 14 09:58 /home/cyneptic
drwx------ 4 cyneptic cyneptic 4096 Apr 13 21:44 /home/cyneptic/.local
drwx------ 3 cyneptic cyneptic 4096 Apr 13 21:44 /home/cyneptic/.local/share
drwx------ 4 cyneptic cyneptic 4096 Apr 14 09:57 /home/cyneptic/.local/share/nvim
drwxr-xr-x 7 cyneptic cyneptic 4096 Apr 14 02:12 /home/cyneptic/.local/share/nvim/mason
drwxr-xr-x 2 cyneptic cyneptic 4096 Apr 14 02:21 /home/cyneptic/.local/share/nvim/mason/.packages

相关内容