0

您可能知道 Chrome OS 正在运行 Linux 容器 (Crostini),对于我的大学课程,我需要安装 Naviserver,它安装在

/usr/local/ns$

我的问题是我需要获得权限才能编辑位于此目录中的文件。所以我认为给我或多或少整个 usr 文件夹的以下权限是个好主意

/usr$ ls -l
drwxr-xr-x 755 /bin
drwxr-xr-x 755 /boot
drwxr-xr-x 755 /dev
drwxr-xr-x 755 /etc
drwxr-xr-x 755 /home
drwxr-xr-x 755 /lib
drwxr-xr-x 755 /lib32
drwxr-xr-x 755 /lib64
drwxr-xr-x 755 /media
drwxr-xr-x 755 /mnt
drwxr-xr-x 755 /opt
dr-xr-xr-x 555 /proc
drwx------ 700 /root
drwxr-xr-x 755 /run
drwxr-xr-x 755 /sbin
drwxr-xr-x 755 /srv
dr-xr-xr-x 555 /sys
drwxrwxrwt 1777 /tmp
drwxrwxrwx 777 /usr
drwxr-xr-x 755 /var
drwxrwxrwx 1 root root 16704 Dec  2 20:16 bin
drwxrwxrwx 1 root root     0 Nov 22  2020 games
drwxrwxrwx 1 root root  2956 Nov 17 18:21 include
drwxrwxrwx 1 root root  1298 Dec  2 18:08 lib
drwxrwxrwx 1 root root   102 May 12  2021 lib32
drwxrwxrwx 1 root root     6 Dec 30  2020 lib64
drwxrwxrwx 1 root root   416 Dec  2 18:07 libexec
drwxrwxrwx 1 root root    76 Nov 17 18:28 local
drwxrwxrwx 1 root root  4716 Dec  2 18:08 sbin
drwxrwxrwx 1 root root  2468 Dec  2 18:08 share
drwxrwxrwx 1 root root     0 Nov 22  2020 src

这当然弄乱了 sudo 文件夹。

当我想使用 sudo 命令时,这会导致以下问题

sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

有没有办法重置权限以解决这个问题?

4

0 回答 0