microsoft / microsoft/vscode-remote-release
Devcontainer fails with "remoteUser" with "mkdir: cannot create directory ‘/root’: Permission denied"
Open
@chrmarti is already working on this.
Since Dec 9, 2022.
bug
containers
podman
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 470
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
-
VSCode Version:
Version: 1.73.1 Commit: 6261075646f055b99068d3688932416f2346dd3b Date: 2022-11-09T03:54:53.913Z Electron: 19.0.17 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Linux x64 5.14.0-1054-oem Sandboxed: No -
Local OS Version: Ubuntu 20.04
-
Remote OS Version: Ubuntu 18.04
-
Remote Extension/Connection Type: Containers/Server
-
Logs:
[2022-12-08T13:27:09.218Z] Stop (83 ms): Run in container: uname -m
[2022-12-08T13:27:09.218Z] Start: Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null
[2022-12-08T13:27:09.219Z] NAME="Ubuntu"
VERSION="18.04.6 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.6 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
[2022-12-08T13:27:09.220Z]
[2022-12-08T13:27:09.220Z] Stop (2 ms): Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null
[2022-12-08T13:27:09.220Z] Start: Run in container: cat /etc/passwd
[2022-12-08T13:27:09.221Z] Stop (1 ms): Run in container: cat /etc/passwd
[2022-12-08T13:27:09.221Z] Start: Updating configuration state
[2022-12-08T13:27:09.225Z] Stop (4 ms): Updating configuration state
[2022-12-08T13:27:09.226Z] Start: Setup shutdown monitor
[2022-12-08T13:27:09.226Z] Forking shutdown monitor: /home/dima/.vscode/extensions/ms-vscode-remote.remote-containers-0.266.1/dist/shutdown/shutdownMonitorProcess /run/user/1000/vscode-remote-containers-6da2fc337d9acc87b102df1f9a3bef3253fbe77b.sock singleContainer Debug /home/dima/.config/Code/logs/20221208T152051/window1/exthost/ms-vscode-remote.remote-containers 1670506027518
[2022-12-08T13:27:09.229Z] Stop (3 ms): Setup shutdown monitor
[2022-12-08T13:27:09.230Z] Start: Run in container: test -d /root/.vscode-server
[2022-12-08T13:27:09.230Z]
[2022-12-08T13:27:09.230Z]
[2022-12-08T13:27:09.231Z] Exit code 1
[2022-12-08T13:27:09.231Z] Stop (1 ms): Run in container: test -d /root/.vscode-server
[2022-12-08T13:27:09.231Z] Start: Run in container: test -d /root/.vscode-remote
[2022-12-08T13:27:09.231Z]
[2022-12-08T13:27:09.232Z]
[2022-12-08T13:27:09.232Z] Exit code 1
[2022-12-08T13:27:09.232Z] Stop (1 ms): Run in container: test -d /root/.vscode-remote
[2022-12-08T13:27:09.232Z] Start: Run in container: test ! -f '/root/.vscode-server/data/Machine/.writeMachineSettingsMarker' && set -o noclobber && mkdir -p '/root/.vscode-server/data/Machine' && { > '/root/.vscode-server/data/Machine/.writeMachineSettingsMarker' ; } 2> /dev/null
[2022-12-08T13:27:09.233Z]
[2022-12-08T13:27:09.233Z] mkdir: cannot create directory ‘/root’: Permission denied
[2022-12-08T13:27:09.234Z] Exit code 1
[2022-12-08T13:27:09.234Z] Stop (2 ms): Run in container: test ! -f '/root/.vscode-server/data/Machine/.writeMachineSettingsMarker' && set -o noclobber && mkdir -p '/root/.vscode-server/data/Machine' && { > '/root/.vscode-server/data/Machine/.writeMachineSettingsMarker' ; } 2> /dev/null
[2022-12-08T13:27:09.234Z] Start: Run in container: cat /root/.vscode-server/data/Machine/settings.json
[2022-12-08T13:27:09.235Z]
[2022-12-08T13:27:09.235Z] cat: /root/.vscode-server/data/Machine/settings.json: Permission denied
[2022-12-08T13:27:09.235Z] Exit code 1
[2022-12-08T13:27:09.235Z] Stop (1 ms): Run in container: cat /root/.vscode-server/data/Machine/settings.json
[2022-12-08T13:27:09.235Z] Start: Run in container: test -d /root/.vscode-server/bin/6261075646f055b99068d3688932416f2346dd3b
[2022-12-08T13:27:09.235Z]
[2022-12-08T13:27:09.236Z]
[2022-12-08T13:27:09.236Z] Exit code 1
[2022-12-08T13:27:09.236Z] Stop (1 ms): Run in container: test -d /root/.vscode-server/bin/6261075646f055b99068d3688932416f2346dd3b
[2022-12-08T13:27:09.236Z] Start: Run in container: test -d /vscode/vscode-server/bin/linux-x64/6261075646f055b99068d3688932416f2346dd3b
[2022-12-08T13:27:09.236Z]
[2022-12-08T13:27:09.236Z]
[2022-12-08T13:27:09.237Z] Stop (1 ms): Run in container: test -d /vscode/vscode-server/bin/linux-x64/6261075646f055b99068d3688932416f2346dd3b
[2022-12-08T13:27:09.237Z] Start: Run in container: mkdir -p '/root/.vscode-server/bin' && ln -snf '/vscode/vscode-server/bin/linux-x64/6261075646f055b99068d3688932416f2346dd3b' '/root/.vscode-server/bin/6261075646f055b99068d3688932416f2346dd3b'
[2022-12-08T13:27:09.238Z]
[2022-12-08T13:27:09.238Z] mkdir: cannot create directory ‘/root’: Permission denied
[2022-12-08T13:27:09.238Z] Exit code 1
[2022-12-08T13:27:09.238Z] Stop (1 ms): Run in container: mkdir -p '/root/.vscode-server/bin' && ln -snf '/vscode/vscode-server/bin/linux-x64/6261075646f055b99068d3688932416f2346dd3b' '/root/.vscode-server/bin/6261075646f055b99068d3688932416f2346dd3b'
[2022-12-08T13:27:09.240Z] Command in container failed: mkdir -p '/root/.vscode-server/bin' && ln -snf '/vscode/vscode-server/bin/linux-x64/6261075646f055b99068d3688932416f2346dd3b' '/root/.vscode-server/bin/6261075646f055b99068d3688932416f2346dd3b'
[2022-12-08T13:27:09.240Z] mkdir: cannot create directory ‘/root’: Permission denied
[2022-12-08T13:27:09.240Z] Exit code
Steps to Reproduce:
- Prepare an image with a non-root user
- Add
"remoteUser": "non-root-user, - Reopen in container
==> Fails with the error above.
Does this issue occur when you try this locally?: No
Does this issue occur when you try this locally and all extensions are disabled?: Yes
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.