I should be able to change ownership for any given file while being root.
Files that live in mounted volumes cannot be chown’d unless they have been previously chmod’d as 600 (at least).
Docker version 1.12.0-rc2, build 906eacd, experimental
The docker process is owned by the mac user, and the test file is also owned by the mac user.
Steps to reproduce the behavior
- touch /Mac/opt/ubuntu/test && chmod 000 /Mac/opt/ubuntu/test
- docker run -v “/Mac/opt/ubuntu”:/tmp/osx ubuntu chown root:root /tmp/osx/test
chown: changing ownership of ‘/tmp/osx/test’: Permission denied
This may seem trivial, but it does work in other file system types that are not osxfs. I’ve read similar topics but it’s still not clear to me why this is happening here.
Why granting chmod 600 allows to chown it?
Why with 000 I’m able to delete the file at will but cannot change the ownership? (I’m actually not trying to change the ownership per se, just re-setting it).
The only reason why I’m bringing this up is that it’s breaking an upgrade process we use on a .deb. This is the minimum reproducible scenario I could find.