{"action":"created","issue":{"url":"https://api.github.com/repos/docker/for-linux/issues/145","repository_url":"https://api.github.com/repos/docker/for-linux","labels_url":"https://api.github.com/repos/docker/for-linux/issues/145/labels{/name}","comments_url":"https://api.github.com/repos/docker/for-linux/issues/145/comments","events_url":"https://api.github.com/repos/docker/for-linux/issues/145/events","html_url":"https://github.com/docker/for-linux/issues/145","id":269437385,"number":145,"title":"Fedora container new files are root","user":{"login":"jrock2004","id":655716,"avatar_url":"https://avatars0.githubusercontent.com/u/655716?v=4","gravatar_id":"","url":"https://api.github.com/users/jrock2004","html_url":"https://github.com/jrock2004","followers_url":"https://api.github.com/users/jrock2004/followers","following_url":"https://api.github.com/users/jrock2004/following{/other_user}","gists_url":"https://api.github.com/users/jrock2004/gists{/gist_id}","starred_url":"https://api.github.com/users/jrock2004/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrock2004/subscriptions","organizations_url":"https://api.github.com/users/jrock2004/orgs","repos_url":"https://api.github.com/users/jrock2004/repos","events_url":"https://api.github.com/users/jrock2004/events{/privacy}","received_events_url":"https://api.github.com/users/jrock2004/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-29T21:27:19Z","updated_at":"2017-10-29T21:45:34Z","closed_at":"2017-10-29T21:45:34Z","author_association":"NONE","body":"<!--\r\nThis issue tracker is for *bug reports* and *feature requests*.\r\nFor questions, and getting help on using docker:\r\n\r\n- Docker documentation - https://docs.docker.com\r\n- Docker Forums - https://forums.docker.com\r\n- Docker community Slack - https://dockercommunity.slack.com/ (register here: http://dockr.ly/community)\r\n- Post a question on StackOverflow, using the Docker tag\r\n-->\r\n\r\n* [x] This is a bug report\r\n* [ ] This is a feature request\r\n* [x] I searched existing issues before opening this one\r\n\r\n<!--\r\nDO NOT report security issues publicly! If you suspect you discovered\r\na security issue, send your report privately to security@docker.com.\r\n-->\r\n\r\n### Expected behavior\r\nWhen running a container with a mounted volume and in the container I create a new file, on the host OS I am expecting the new file to be owned by the logged in user\r\n\r\n### Actual behavior\r\nNew files are being created as root\r\n\r\n### Steps to reproduce the behavior\r\n- Create a new directory and enter it\r\n- Type the following command\r\n\r\n```\r\n$ docker run -it -v $(pwd):/app jrock2004/emberjs:2.16.0-alpine sh \r\n```\r\n- Create a new file like `touch index.html`\r\n- On the host OS, open the file that was created in the container and it should be editable\r\n\r\n<!--\r\nDescribe the exact steps to reproduce. If possible, provide a *minimum*\r\nreproduction example; take into account that others do not have access\r\nto your private images, source code, and environment.\r\n\r\nREMOVE SENSITIVE DATA BEFORE POSTING (replace those parts with \"REDACTED\")\r\n-->\r\n\r\n**Output of `docker version`:**\r\n\r\n```\r\nDocker version 17.09.0-ce, build afdb6d4\r\n```\r\n\r\n**Output of `docker info`:**\r\n\r\n```\r\nContainers: 5\r\n Running: 1\r\n Paused: 0\r\n Stopped: 4\r\nImages: 2\r\nServer Version: 17.09.0-ce\r\nStorage Driver: overlay2\r\n Backing Filesystem: extfs\r\n Supports d_type: true\r\n Native Overlay Diff: true\r\nLogging Driver: json-file\r\nCgroup Driver: cgroupfs\r\nPlugins:\r\n Volume: local\r\n Network: bridge host macvlan null overlay\r\n Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog\r\nSwarm: inactive\r\nRuntimes: runc\r\nDefault Runtime: runc\r\nInit Binary: docker-init\r\ncontainerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0\r\nrunc version: 3f2f8b84a77f73d38244dd690525642a72156c64\r\ninit version: 949e6fa\r\nSecurity Options:\r\n seccomp\r\n  Profile: default\r\nKernel Version: 4.13.9-200.fc26.x86_64\r\nOperating System: Fedora 26 (Workstation Edition)\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 4\r\nTotal Memory: 7.66GiB\r\nName: devbox\r\nID: ZBYO:YRTL:K7FX:6RMT:CE36:LAPH:AMIO:CLVT:HN4R:46WS:AXLL:DUXM\r\nDocker Root Dir: /var/lib/docker\r\nDebug Mode (client): false\r\nDebug Mode (server): false\r\nRegistry: https://index.docker.io/v1/\r\nExperimental: false\r\nInsecure Registries:\r\n 127.0.0.0/8\r\nLive Restore Enabled: false\r\n```\r\n\r\n**Additional environment details (AWS, VirtualBox, physical, etc.)**\r\n\r\n```\r\nNAME=Fedora\r\nVERSION=\"26 (Workstation Edition)\"\r\nID=fedora\r\nVERSION_ID=26\r\nPRETTY_NAME=\"Fedora 26 (Workstation Edition)\"\r\nANSI_COLOR=\"0;34\"\r\nCPE_NAME=\"cpe:/o:fedoraproject:fedora:26\"\r\nHOME_URL=\"https://fedoraproject.org/\"\r\nBUG_REPORT_URL=\"https://bugzilla.redhat.com/\"\r\nREDHAT_BUGZILLA_PRODUCT=\"Fedora\"\r\nREDHAT_BUGZILLA_PRODUCT_VERSION=26\r\nREDHAT_SUPPORT_PRODUCT=\"Fedora\"\r\nREDHAT_SUPPORT_PRODUCT_VERSION=26\r\nPRIVACY_POLICY_URL=https://fedoraproject.org/wiki/Legal:PrivacyPolicy\r\nVARIANT=\"Workstation Edition\"\r\nVARIANT_ID=workstation\r\n```\r\n\r\nI have run this container on a mac and windows machine and it works just fine. So I do not think it has to do with the image\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/docker/for-linux/issues/comments/340302781","html_url":"https://github.com/docker/for-linux/issues/145#issuecomment-340302781","issue_url":"https://api.github.com/repos/docker/for-linux/issues/145","id":340302781,"user":{"login":"thaJeztah","id":1804568,"avatar_url":"https://avatars2.githubusercontent.com/u/1804568?v=4","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":"2017-10-29T21:45:34Z","updated_at":"2017-10-29T21:45:34Z","author_association":"MEMBER","body":"This is not a bug; those files are created by the process running inside the container, and will get ownership and permissions of the container's process (in this case `root`). Docker for Mac/Docker for Windows run the docker daemon (and containers) in a thin VM, and use some \"magic\" to translate permissions, but on a Linux system, host directories  are directly mounted inside the container, so files/permissions inside the container are exactly the same on the host.\r\n\r\nI'm closing this issue because this is not a bug, but feel free to continue the conversation "}}
{"actor":{"display_login":"thaJeztah"}}