openvscode-server icon indicating copy to clipboard operation
openvscode-server copied to clipboard

EACCES: permission denied, mkdir '/home/workspace/.openvscode-server/extensions'

Open domesticmouse opened this issue 3 years ago • 5 comments

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: latest
  • OS Version: Linux 5.10.46-4rodete4-amd64
  • Docker version: Docker version 20.10.2, build 2291f61

Steps to Reproduce:

$ docker run -it --init -p 3000:3000 -v "$(pwd):/home/workspace:cached" gitpod/openvscode-server
[main 2021-10-25T23:27:07.843Z] rejected promise not handled within 1 second: Error: EACCES: permission denied, mkdir '/home/workspace/.openvscode-server/extensions'
[main 2021-10-25T23:27:07.847Z] stack trace: Error: EACCES: permission denied, mkdir '/home/workspace/.openvscode-server/extensions'
[main 2021-10-25T23:27:07.848Z] [Error: EACCES: permission denied, mkdir '/home/workspace/.openvscode-server/extensions'] {
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path: '/home/workspace/.openvscode-server/extensions'
}

domesticmouse avatar Oct 25 '21 23:10 domesticmouse

Possible duplicate of https://github.com/gitpod-io/openvscode-server/issues/148, @domesticmouse can you please check with running docker as root?

filiptronicek avatar Oct 26 '21 10:10 filiptronicek

This is on macOS with Docker desktop.

domesticmouse avatar Oct 27 '21 09:10 domesticmouse

Could you please make the UID & GID overrideable via environment variables?

jangrewe avatar Oct 29 '21 08:10 jangrewe

Dockerfile is here: https://github.com/gitpod-io/openvscode-releases/blob/main/Dockerfile contributions are welcomed

akosyakov avatar Oct 29 '21 09:10 akosyakov

When I bind mount my working directory (i.e. $pwd) to /home/workspace inside the container, the uid and gid of /home/workspace is the same with those of $pwd in my host.

However, both uid and gid of /home/workspace inside the container is expected to be 1000 (specified in Dockerfile).

I remove the -v option in docker run, and it works.

Repeater9 avatar Dec 26 '23 11:12 Repeater9