我从 Ubuntu 16.04 升级到 16.10。我正在运行一些容器systemd-nspawn
。
升级后,容器中部分权限映射不正确:
root@delug:/tmp# ls /root
ls: cannot open directory '/root': Permission denied
root@delug:/tmp# ls -l /
total 60
drwxr-xr-x 2 root root 4096 Nov 22 16:38 bin
drwxr-xr-x 2 root root 4096 Apr 12 2016 boot
drwxr-xr-x 7 root root 440 Nov 26 10:23 dev
drwxr-xr-x 82 root root 4096 Nov 26 10:23 etc
drwxr-xr-x 2 root root 4096 Apr 12 2016 home
drwxr-xr-x 9 root root 4096 Jul 23 23:23 lib
drwxr-xr-x 2 root root 4096 Nov 22 16:38 lib64
drwxr-xr-x 2 root root 4096 Jul 14 14:34 media
drwxr-xr-x 3 root root 4096 Jul 27 21:16 mnt
drwxr-xr-x 2 root root 4096 Oct 13 21:11 opt
dr-xr-xr-x 208 nobody nogroup 0 Nov 26 10:23 proc
drwx------ 17 nobody nogroup 4096 Nov 25 20:57 root
drwxr-xr-x 12 root root 440 Nov 26 10:23 run
drwxr-xr-x 2 root root 4096 Nov 22 16:38 sbin
drwxr-xr-x 2 root root 4096 Jul 14 14:34 srv
drwxr-xr-x 9 root root 180 Nov 26 10:23 sys
drwxr-xr-x 4 nobody nogroup 4096 Nov 20 19:40 temp
drwxrwxrwt 7 root root 140 Nov 26 10:23 tmp
drwxr-xr-x 10 root root 4096 Jul 14 14:34 usr
drwxr-xr-x 11 root root 4096 Jul 14 14:34 var
debootstrap
当我使用新的 yakkety 图像时也会发生这种情况(与上面相同的问题)。
如何恢复正确的权限/所有权映射?
注:我提交了一个错误关于下面的行为,但希望修复我现有的容器。