In the steps from comment #3, after the chown ls shows the file in both
the upperdir and the mount as owned by $USER:$USER. However the inode
from the overlayfs superblock which ovl_setattr() passes to
inode_change_ok() seems to still be owned by root. This seems to be
because ovl_getattr() gets the attributes from the inode in the
upper/lower fs and not from the overlayfs inode.

Actually, I don't think the attributes were ever being copied to the
overlayfs inode. "ovl: setattr: check permissions before copy-up" adds a
call to inode_change_ok() on the overlayfs inode at the beginning of
ovl_setattr(). Before that it only ever checked that the change was okay
for the inode in upperdir, so the fact that the attributes weren't
copied over didn't cause a failure.

That's a commit we got from upstream stable, and sure enough the bug
exists in 4.5-rc7 as well.

** Changed in: linux (Ubuntu Xenial)
       Status: Triaged => In Progress

** Changed in: linux (Ubuntu Xenial)
     Assignee: (unassigned) => Seth Forshee (sforshee)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1555997

Title:
  overlay fs regression: chmod fails with "Operation not permitted" on
  chowned files

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1555997/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to