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

userns-remap: auto-created WORKDIR has wrong owner #20979

Closed
AlekseyMartynov opened this issue Mar 5, 2016 · 1 comment
Closed

userns-remap: auto-created WORKDIR has wrong owner #20979

AlekseyMartynov opened this issue Mar 5, 2016 · 1 comment
Assignees
Labels
kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed.
Milestone

Comments

@AlekseyMartynov
Copy link

Output of docker version:

Client:
 Version:      1.10.2
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   c3959b1
 Built:        Mon Feb 22 21:37:01 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.10.2
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   c3959b1
 Built:        Mon Feb 22 21:37:01 2016
 OS/Arch:      linux/amd64

Output of docker info:

Containers: 1
 Running: 0
 Paused: 0
 Stopped: 1
Images: 7
Server Version: 1.10.2
Storage Driver: aufs
 Root Dir: /var/lib/docker/100000.100000/aufs
 Backing Filesystem: extfs
 Dirs: 16
 Dirperm1 Supported: false
Execution Driver: native-0.2
Logging Driver: json-file
Plugins:
 Volume: local
 Network: bridge null host
Kernel Version: 3.13.0-24-generic
Operating System: Ubuntu 14.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 994.1 MiB
Name: cs26257
ID: HOND:5EEV:AWFN:KGS4:52JB:5S6R:G2XO:7V5T:AU7W:46IG:34DE:N66I
WARNING: No swap limit support

Dockerfile:

FROM node
WORKDIR /dir123
RUN npm install lodash

Build fails with:

npm ERR! Error: EACCES: permission denied, access '/dir123'
npm ERR!     at Error (native)
npm ERR!  { [Error: EACCES: permission denied, access '/dir123'] errno: -13, code: 'EACCES', syscall: 'access', path: '/dir123' }

Indeed, owner of WORKDIR is real root

/var/lib/docker/100000.100000/aufs/diff/a343b6854cf13ecbbd370e9678db2dd4dce5eaa60631a732b6443d1b34f4f094

ls -l

total 12
drwxr-xr-x 2 root   root   4096 Mar  5 21:42 dir123
drwx------ 3 100000 100000 4096 Mar  5 21:42 root
drwxrwxrwt 3 100000 100000 4096 Mar  5 21:42 tmp
@thaJeztah
Copy link
Member

Looks a bit similar to this one #20446

ping @estesp 😄

@thaJeztah thaJeztah added the kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed. label Mar 5, 2016
@estesp estesp self-assigned this Mar 8, 2016
@thaJeztah thaJeztah added this to the 1.11.0 milestone Mar 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed.
Projects
None yet
Development

No branches or pull requests

3 participants