{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/24913","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/24913/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/24913/comments","events_url":"https://api.github.com/repos/docker/docker/issues/24913/events","html_url":"https://github.com/docker/docker/issues/24913","id":166944672,"number":24913,"title":"permissions broken after chown","user":{"login":"ccp0101","id":303501,"avatar_url":"https://avatars.githubusercontent.com/u/303501?v=3","gravatar_id":"","url":"https://api.github.com/users/ccp0101","html_url":"https://github.com/ccp0101","followers_url":"https://api.github.com/users/ccp0101/followers","following_url":"https://api.github.com/users/ccp0101/following{/other_user}","gists_url":"https://api.github.com/users/ccp0101/gists{/gist_id}","starred_url":"https://api.github.com/users/ccp0101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccp0101/subscriptions","organizations_url":"https://api.github.com/users/ccp0101/orgs","repos_url":"https://api.github.com/users/ccp0101/repos","events_url":"https://api.github.com/users/ccp0101/events{/privacy}","received_events_url":"https://api.github.com/users/ccp0101/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/area/kernel","name":"area/kernel","color":"fbca04"},{"url":"https://api.github.com/repos/docker/docker/labels/area/storage/overlay","name":"area/storage/overlay","color":"fbca04"},{"url":"https://api.github.com/repos/docker/docker/labels/version/1.11","name":"version/1.11","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-22T00:06:09Z","updated_at":"2016-08-13T00:37:51Z","closed_at":null,"body":"Similar to this https://github.com/docker/docker/issues/20240 but overlayfs instead of aufs.\r\n\r\n**Output of `docker version`:**\r\n```\r\nClient:\r\n Version:      1.11.2\r\n API version:  1.23\r\n Go version:   go1.5.4\r\n Git commit:   3be27b1\r\n Built:        Wed Jul 13 22:20:39 2016\r\n OS/Arch:      linux/amd64\r\n\r\nServer:\r\n Version:      1.11.2\r\n API version:  1.23\r\n Go version:   go1.5.4\r\n Git commit:   3be27b1\r\n Built:        Wed Jul 13 22:20:39 2016\r\n OS/Arch:      linux/amd64\r\n```\r\n\r\n\r\n**Output of `docker info`:**\r\n```\r\nContainers: 20\r\n Running: 0\r\n Paused: 0\r\n Stopped: 20\r\nImages: 63\r\nServer Version: 1.11.2\r\nStorage Driver: overlay\r\n Backing Filesystem: extfs\r\nLogging Driver: json-file\r\nCgroup Driver: cgroupfs\r\nPlugins: \r\n Volume: local\r\n Network: bridge null host\r\nKernel Version: 4.4.0-31-generic\r\nOperating System: Ubuntu 16.04.1 LTS\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 2\r\nTotal Memory: 7.303 GiB\r\nName: ip-10-0-2-155\r\nID: 7BJE:QA52:2TZC:5PIV:P4AX:XCKT:ZBFF:7TYV:KS5M:TIUC:TTC4:NAQL\r\nDocker Root Dir: /var/lib/docker\r\nDebug mode (client): false\r\nDebug mode (server): true\r\n File Descriptors: 13\r\n Goroutines: 30\r\n System Time: 2016-07-21T22:50:31.603455433Z\r\n EventsListeners: 0\r\nRegistry: https://index.docker.io/v1/\r\nWARNING: No swap limit support\r\n\r\n```\r\n\r\n**Additional environment details (AWS, VirtualBox, physical, etc.):**\r\nDocker is running on a lightly customized Ubuntu Xenial (based on ami-ddf13fb0). Kernel is up-to-date.\r\n`Linux ip-10-0-2-155 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux`\r\n\r\n**Steps to reproduce the issue:**\r\nMake a Dockerfile template:\r\n```\r\nFROM ubuntu:xenial\r\n\r\nRUN groupadd --gid 1000 ubuntu && \\\r\n    useradd -u 1000 -g 1000 --home-dir /home/ubuntu --create-home ubuntu\r\n\r\nRUN mkdir /test && \\\r\n    mkdir /test/subdir && chmod PERM /test/subdir\r\n\r\nRUN chown -R 1000:1000 /test && \\\r\n    su ubuntu -c 'touch /test/subdir/xx'\r\n```\r\n\r\n`perl -pe 's/PERM/777/' Dockerfile | docker build --no-cache -` succeeds:\r\n\r\n```\r\nSending build context to Docker daemon 2.048 kB\r\nStep 1 : FROM ubuntu:xenial\r\n ---> ac526a356ca4\r\nStep 2 : RUN groupadd --gid 1000 ubuntu &&     useradd -u 1000 -g 1000 --home-dir /home/ubuntu --create-home ubuntu\r\n ---> Running in 395d10d8cd10\r\n ---> ff18ac26f284\r\nRemoving intermediate container 395d10d8cd10\r\nStep 3 : RUN mkdir /test &&     mkdir /test/subdir && chmod 777 /test/subdir\r\n ---> Running in 32ff8df6daf4\r\n ---> c082a205b422\r\nRemoving intermediate container 32ff8df6daf4\r\nStep 4 : RUN chown -R 1000:1000 /test &&     su ubuntu -c 'touch /test/subdir/xx'\r\n ---> Running in 8e1073bdb89d\r\n ---> 700e3a617b48\r\nRemoving intermediate container 8e1073bdb89d\r\nSuccessfully built 700e3a617b48\r\n```\r\n\r\n`perl -pe 's/PERM/700/' Dockerfile | docker build --no-cache -` throws permission error:\r\n\r\n```\r\nSending build context to Docker daemon 2.048 kB\r\nStep 1 : FROM ubuntu:xenial\r\n ---> ac526a356ca4\r\nStep 2 : RUN groupadd --gid 1000 ubuntu &&     useradd -u 1000 -g 1000 --home-dir /home/ubuntu --create-home ubuntu\r\n ---> Running in 440243108cc6\r\n ---> 820e9093c6ea\r\nRemoving intermediate container 440243108cc6\r\nStep 3 : RUN mkdir /test &&     mkdir /test/subdir && chmod 700 /test/subdir\r\n ---> Running in 8ad779bffbd0\r\n ---> a2bd48ae03e2\r\nRemoving intermediate container 8ad779bffbd0\r\nStep 4 : RUN chown -R 1000:1000 /test &&     su ubuntu -c 'touch /test/subdir/xx'\r\n ---> Running in 7c7b352fed1e\r\ntouch: cannot touch '/test/subdir/xx': Permission denied\r\nThe command '/bin/sh -c chown -R 1000:1000 /test &&     su ubuntu -c 'touch /test/subdir/xx'' returned a non-zero code: 1\r\n```\r\n\r\n**Describe the results you received:**\r\nSee above. `test -w` calls succeed as expected, but `touch` that follows fails, unless writable is set for other (o+w)?  \r\n\r\n**Describe the results you expected:**\r\nExpected both to succeed because the owner has full access to `/test` folder. \r\n\r\n**Additional information you deem important (e.g. issue happens only occasionally):**\r\nWas able to reproduce in boot2docker too. \r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/239590469","html_url":"https://github.com/docker/docker/issues/24913#issuecomment-239590469","issue_url":"https://api.github.com/repos/docker/docker/issues/24913","id":239590469,"user":{"login":"thaJeztah","id":1804568,"avatar_url":"https://avatars.githubusercontent.com/u/1804568?v=3","gravatar_id":"","url":"https://api.github.com/users/thaJeztah","html_url":"https://github.com/thaJeztah","followers_url":"https://api.github.com/users/thaJeztah/followers","following_url":"https://api.github.com/users/thaJeztah/following{/other_user}","gists_url":"https://api.github.com/users/thaJeztah/gists{/gist_id}","starred_url":"https://api.github.com/users/thaJeztah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaJeztah/subscriptions","organizations_url":"https://api.github.com/users/thaJeztah/orgs","repos_url":"https://api.github.com/users/thaJeztah/repos","events_url":"https://api.github.com/users/thaJeztah/events{/privacy}","received_events_url":"https://api.github.com/users/thaJeztah/received_events","type":"User","site_admin":false},"created_at":"2016-08-13T00:37:51Z","updated_at":"2016-08-13T00:37:51Z","body":"/cc @AkihiroSuda :smile: "}}
{"actor":{"display_login":"thaJeztah"}}