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

Temporary permissions issues on launch (detected dubious ownership in repository) #1107

Open
mjswensen opened this issue Jun 3, 2024 · 0 comments
Labels

Comments

@mjswensen
Copy link

What happened?

For the first few minutes after a container starts, the owner of the repository folder is root. At seemingly random, it changes to the correct user (in my case: node for the official Node.js-based dev container by Microsoft).

Below are some commands run from within the container shortly after starting it up. No other commands were run between them. I've highlighted the permission change in yellow:

Screenshot 2024-06-03 at 4 09 28 PM

Here's the text version of the screenshot:

  1. git status results in fatal: detected dubious ownership in repository at ...
  2. ls -alF shows current working directory owned by root:root
  3. Another ls -alF, run perhaps 30-60 seconds after the previous, shows current working directory owned by node:node, as it should be
  4. Another run of git status results in no error. (Also the branch name shows in the bash prompt since the permissions are in a corrected state)

What did you expect to happen instead?

The permissions should be correct upon the launching of the editor connected to the container.

How can we reproduce the bug? (as minimally and precisely as possible)

devcontainer.json:

{
  "name": "...",
  "build": { "dockerfile": "./Dockerfile" },
  "customizations": {
    "vscode": {
      "extensions": [
        "angular.ng-template",
        "editorconfig.editorconfig",
        "esbenp.prettier-vscode"
      ]
    }
  },
  "features": {
    "ghcr.io/devcontainers/features/github-cli:1": {}
  }
}

Dockerfile:

FROM mcr.microsoft.com/devcontainers/javascript-node:20
...
  1. Set up a git repository with the above container configuration files.
  2. Launch the dev container using DevPod
  3. Observe the behavior outlined above

Local Environment:

  • DevPod Version: v0.5.12
  • Operating System: mac
  • ARCH of the OS: ARM64

DevPod Provider:

  • Local/remote provider: docker

Anything else we need to know?

The IDE used for the container is VS Code for web.


Thank you for this awesome tool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant