Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot change ownership of read-only file in mounted volume #633

Closed
sameersbn opened this issue Sep 15, 2016 · 5 comments
Closed

Cannot change ownership of read-only file in mounted volume #633

sameersbn opened this issue Sep 15, 2016 · 5 comments

Comments

@sameersbn
Copy link

Expected behavior

Ownership of file should change.

Actual behavior

Permission denied error displayed by chown command

Information

Diagnostic ID: C6AC4F0F-8770-4592-8AB1-E34D52436EEF
Docker for Mac: 1.12.0-a (Build 11213)
macOS: Version 10.11.6 (Build 15G1004)
[OK] docker-cli
[OK] app
[OK] moby-syslog
[OK] disk
[OK] virtualization
[OK] system
[OK] menubar
[OK] osxfs
[OK] db
[OK] slirp
[OK] moby-console
[OK] logs
[OK] vmnetd
[OK] env
[OK] moby
[OK] driver.amd64-linux

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 readwrite mode:

$ 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
@dsheets
Copy link
Contributor

dsheets commented Sep 15, 2016

This is a (clearer) duplicate of #117 and #263. Thanks for the report. We hope to have a fix out soon.

@jakajancar
Copy link

@dsheets Can you explain what the fix will be? Will you just start saving permissions in OS X extended attributes, or is it going to also remove (uid/gid = current uid/gid)?

@jakajancar
Copy link

Anything new here?

@dsheets
Copy link
Contributor

dsheets commented Oct 26, 2016

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!

@dsheets dsheets closed this as completed Oct 26, 2016
@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jun 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants