kernel-packages team mailing list archive
-
kernel-packages team
-
Mailing list archive
-
Message #129264
[Bug 1480411] [NEW] rm -r * fails to delete directories when using overlayfs in a user-namespace
Public bug reported:
rm -r * fails to delete directories when using overlayfs in a user-
namespace.
If overlayfs is mounted as follows,
mount -n -t overlay overlay -o
lowerdir=lowerdir,upperdir=upperdir,workdir=workdir mntpt
and if lowerdir contains lowerdir/foo/bar.txt, then,
rm -r mntpt/foo
fails with error message,
"rm: cannot remove ‘mntpt/foo’: Operation not permitted"
strace shows,
unlinkat(AT_FDCWD, "mntpt/foo", AT_REMOVEDIR) = -1 EPERM (Operation
not permitted)
OS details: 64-bit ubuntu 14.04.2 with the linux-generic-lts-vivid
kernel.
The bug does not occur with the default 3.13 kernel. The bug occurs for any vanilla 3.18+ kernel to which the 1-line patch, "overlayfs: allow unprivileged mounts" is added. (The patch is at, http://kernel.ubuntu.com/git/ubuntu/ubuntu-vivid.git/commit/?id=78ec45495b15d27d4cc6d05cc454e30ec5b587ea)
The bug occurs regardless of whether the underlying filesystem is tmpfs or ext4.
A script which reproduces the bug is attached and is also available at
http://paste.ubuntu.com/11974137/
Hardware: intel core2 duo processor in a macbook-4.1
** Affects: linux (Ubuntu)
Importance: Undecided
Status: New
** Tags: overlayfs
** Attachment added: "script to reproduce the bug"
https://bugs.launchpad.net/bugs/1480411/+attachment/4437088/+files/overlayfs-bug.sh
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1480411
Title:
rm -r * fails to delete directories when using overlayfs in a user-
namespace
Status in linux package in Ubuntu:
New
Bug description:
rm -r * fails to delete directories when using overlayfs in a user-
namespace.
If overlayfs is mounted as follows,
mount -n -t overlay overlay -o
lowerdir=lowerdir,upperdir=upperdir,workdir=workdir mntpt
and if lowerdir contains lowerdir/foo/bar.txt, then,
rm -r mntpt/foo
fails with error message,
"rm: cannot remove ‘mntpt/foo’: Operation not permitted"
strace shows,
unlinkat(AT_FDCWD, "mntpt/foo", AT_REMOVEDIR) = -1 EPERM
(Operation not permitted)
OS details: 64-bit ubuntu 14.04.2 with the linux-generic-lts-vivid
kernel.
The bug does not occur with the default 3.13 kernel. The bug occurs for any vanilla 3.18+ kernel to which the 1-line patch, "overlayfs: allow unprivileged mounts" is added. (The patch is at, http://kernel.ubuntu.com/git/ubuntu/ubuntu-vivid.git/commit/?id=78ec45495b15d27d4cc6d05cc454e30ec5b587ea)
The bug occurs regardless of whether the underlying filesystem is tmpfs or ext4.
A script which reproduces the bug is attached and is also available at
http://paste.ubuntu.com/11974137/
Hardware: intel core2 duo processor in a macbook-4.1
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1480411/+subscriptions
Follow ups
-
[Bug 1480411] Re: rm -r * fails to delete directories when using overlayfs in a user-namespace
From: oleg, 2016-02-24
-
[Bug 1480411] Re: rm -r * fails to delete directories when using overlayfs in a user-namespace
From: Andy Whitcroft, 2016-02-01
-
[Bug 1480411] Re: rm -r * fails to delete directories when using overlayfs in a user-namespace
From: Andy Whitcroft, 2016-01-19
-
[Bug 1480411] Re: rm -r * fails to delete directories when using overlayfs in a user-namespace
From: Andy Whitcroft, 2015-12-07
-
[Bug 1480411] Re: rm -r * fails to delete directories when using overlayfs in a user-namespace
From: oleg, 2015-11-10
-
[Bug 1480411] Re: rm -r * fails to delete directories when using overlayfs in a user-namespace
From: Serge Hallyn, 2015-11-10
-
[Bug 1480411] Re: rm -r * fails to delete directories when using overlayfs in a user-namespace
From: oleg, 2015-11-10
-
[Bug 1480411] Re: rm -r * fails to delete directories when using overlayfs in a user-namespace
From: oleg, 2015-11-10
-
[Bug 1480411] Re: rm -r * fails to delete directories when using overlayfs in a user-namespace
From: Stéphane Graber, 2015-11-09
-
[Bug 1480411] Re: rm -r * fails to delete directories when using overlayfs in a user-namespace
From: Andy Whitcroft, 2015-11-04
-
[Bug 1480411] Re: rm -r * fails to delete directories when using overlayfs in a user-namespace
From: Andy Whitcroft, 2015-10-04
-
[Bug 1480411] Re: rm -r * fails to delete directories when using overlayfs in a user-namespace
From: Andy Whitcroft, 2015-09-01
-
[Bug 1480411] Re: rm -r * fails to delete directories when using overlayfs in a user-namespace
From: Serge Hallyn, 2015-08-18
-
[Bug 1480411] Re: rm -r * fails to delete directories when using overlayfs in a user-namespace
From: Serge Hallyn, 2015-08-18
-
[Bug 1480411] Re: rm -r * fails to delete directories when using overlayfs in a user-namespace
From: oleg, 2015-08-18
-
[Bug 1480411] Re: rm -r * fails to delete directories when using overlayfs in a user-namespace
From: Serge Hallyn, 2015-08-18
-
[Bug 1480411] Re: rm -r * fails to delete directories when using overlayfs in a user-namespace
From: Launchpad Bug Tracker, 2015-08-18
-
[Bug 1480411] Re: rm -r * fails to delete directories when using overlayfs in a user-namespace
From: Thomas Müller, 2015-08-18
-
[Bug 1480411] Re: rm -r * fails to delete directories when using overlayfs in a user-namespace
From: oleg, 2015-08-18
-
[Bug 1480411] Re: rm -r * fails to delete directories when using overlayfs in a user-namespace
From: oleg, 2015-08-03
-
[Bug 1480411] Re: rm -r * fails to delete directories when using overlayfs in a user-namespace
From: oleg, 2015-08-02
-
[Bug 1480411] Re: rm -r * fails to delete directories when using overlayfs in a user-namespace
From: Andy Whitcroft, 2015-07-31