[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#969223: Can't rm directory on overlayfs in userns



On Sat, Aug 29, 2020 at 10:13 PM Shengjing Zhu <zhsj@debian.org> wrote:
>
> Source: linux
> Version: 5.7.10-1
> Severity: normal
>
> Hi,
>
> After enabling overlayfs for userns, I find it doesn't work as expected.
>
> $ cat /sys/module/overlay/parameters/permit_mounts_in_userns
> Y
>
> zsj@debian:~/test$ pwd
> /home/zsj/test
> zsj@debian:~/test$ tree
> .
> ├── lower
> │   └── a
> │       └── a
> ├── merged
> ├── upper
> └── work
>
> zsj@debian:~/test$ unshare -m -U -r
> root@debian:~/test# mount -t overlay -o rw,lowerdir=/home/zsj/test/lower,upperdir=/home/zsj/test/upper,workdir=/home/zsj/test/work overlay /home/zsj/test/merged
> root@debian:~/test# rm -rf merged/a
> rm: cannot remove 'merged/a': Input/output error
>
> -- System Information:
> Debian Release: bullseye/sid
>   APT prefers testing
>   APT policy: (500, 'testing')
> Architecture: amd64 (x86_64)
>
> Kernel: Linux 5.7.0-2-amd64 (SMP w/4 CPU threads)
> Kernel taint flags: TAINT_USER, TAINT_FIRMWARE_WORKAROUND
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
> Shell: /bin/sh linked to /usr/bin/dash
> Init: systemd (via /run/systemd/system)

If I upgrade a debian10 VM to testing, it seems to work.
However if I boot a new debian testing VM, it seems not to work.
Both VMs are downloaded from http://cdimage.debian.org/cdimage/cloud/
What can be the difference here? I'm lost on debugging this..

-- 
Shengjing Zhu


Reply to: