Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Cannot change ownership of read-only file in mounted volume #633
Ownership of file should change.
Permission denied error displayed by
Diagnostic ID: C6AC4F0F-8770-4592-8AB1-E34D52436EEF
Steps to reproduce
$ mkdir -p sandbox && cd sandbox $ docker run -it --rm -v $PWD:/data --workdir /data ubuntu:14.04 bash $ touch sample && chmod 444 sample && ls -la total 5 drwxr-xr-x 3 root root 102 Sep 15 12:28 . drwxr-xr-x 35 root root 4096 Sep 15 12:27 .. -r--r--r-- 1 root root 0 Sep 15 12:28 sample $ chown daemon:daemon sample chown: changing ownership of 'sample': Permission denied
The ownership of the file can however be changed by first changing the mode to
$ chmod 755 sample $ chown daemon:daemon sample $ ls -la sample total 5 drwxr-xr-x 3 root root 102 Sep 15 12:51 . drwxr-xr-x 35 root root 4096 Sep 15 12:51 .. -rwxr-xr-x 1 daemon daemon 0 Sep 15 12:51 sample
This should be fixed in the just-released Beta 29. Sorry for the delay in resolving the issue -- we had a couple of false starts on the design but now we use an ACL entry to make xattrs (containing ownership metadata) behave like inode metadata in most circumstances. Please give it a try and let us know how it works (or doesn't) for you. I'm going to close this issue but if you find related problems, please feel free to re-open. If you find un-related problems, please open a new issue. :-)
Thanks for using Docker for Mac!