images icon indicating copy to clipboard operation
images copied to clipboard

`vscode` user doesn't have permissions to the `.vscode-remote` folder

Open snebjorn opened this issue 3 years ago • 6 comments
trafficstars

The vscode user doesn't have permissions to the .vscode-remote folder which causes a bunch of issue with VSCode extensions.

See

  • https://github.com/redhat-developer/vscode-java/issues/2726
  • https://github.com/orgs/community/discussions/35119

I tried with and without

"remoteUser": "vscode"

But both seems to have issues.

I'm seeing stuff like this

[renderer4] [error] ENOENT: no such file or directory, open '/home/vscode/.vscode-remote/data/User/workspaceStorage/115d3bbf190e55f88d444089e54b0ca3/redhat.java/jdt_ws/.metadata/.log': Error: ENOENT: no such file or directory, open '/home/vscode/.vscode-remote/data/User/workspaceStorage/115d3bbf190e55f88d444089e54b0ca3/redhat.java/jdt_ws/.metadata/.log'

[renderer4] [error] Error: EPERM: operation not permitted, copyfile '/workspaces/openapi-generator/.devcontainer/devcontainer.json' -> '/home/vscode/.vscode-remote/data/User/History/c4cefaa/vwnA.json': NoPermissions (FileSystemError): Error: EPERM: operation not permitted, copyfile '/workspaces/openapi-generator/.devcontainer/devcontainer.json' -> '/home/vscode/.vscode-remote/data/User/History/c4cefaa/vwnA.json'
    at u (/vscode/bin/linux-x64/64bbfbf67ada9953918d72e1df2f4d8e537d340e/out/vs/server/node/server.main.js:82:38982)
    at r.toFileSystemProviderError (/vscode/bin/linux-x64/64bbfbf67ada9953918d72e1df2f4d8e537d340e/out/vs/server/node/server.main.js:87:44997)
    at r.doCloneFile (/vscode/bin/linux-x64/64bbfbf67ada9953918d72e1df2f4d8e537d340e/out/vs/server/node/server.main.js:87:44246)

and this one is plain weird. Why does it try to access my local VSCode? I don't have the java extension installed locally, only in the codepsaces

[renderer4] [error] [Extension Host] Error: command 'java.execute.workspaceCommand' not found
    at S._tryExecuteCommand (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1715:3532)
    at S.executeCommand (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1715:3414)

snebjorn avatar Oct 08 '22 11:10 snebjorn

Manually open the terminal on remote container, and the command ls -l /home/vscode also says no permissions.

testforstephen avatar Oct 09 '22 05:10 testforstephen

didn't notice this before. But even the workspace folder have permission issues

@snebjorn ➜ /workspaces/openapi-generator (feature/devcontainer ✗) $ ls
ls: cannot access 'Vagrantfile': Operation not permitted
ls: cannot access 'docs': Operation not permitted
ls: cannot access 'samples': Operation not permitted
ls: cannot access 'bin': Operation not permitted
ls: cannot access 'CODE_OF_CONDUCT.md': Operation not permitted
ls: cannot access 'new.sh': Operation not permitted
ls: cannot access 'docker-compose.yml': Operation not permitted
ls: cannot access 'scripts': Operation not permitted
ls: cannot access 'LICENSE': Operation not permitted
ls: cannot access 'appveyor.yml': Operation not permitted
ls: cannot access 'modules': Operation not permitted
ls: cannot access 'README.md': Operation not permitted
ls: cannot access 'CONTRIBUTING.md': Operation not permitted
ls: cannot access 'google_checkstyle.xml': Operation not permitted
ls: cannot access 'spotbugs-exclude.xml': Operation not permitted
ls: cannot access 'docker-entrypoint.sh': Operation not permitted
ls: cannot access 'bitrise.yml': Operation not permitted
ls: cannot access 'mvnw': Operation not permitted
ls: cannot access 'website': Operation not permitted
ls: cannot access 'sec.gpg.enc': Operation not permitted
ls: cannot access 'shippable.yml': Operation not permitted
ls: cannot access 'openapi-generator.code-workspace': Operation not permitted
ls: cannot access 'CI': Operation not permitted
ls: cannot access 'pom.xml': Operation not permitted
ls: cannot access 'mvnw.cmd': Operation not permitted
ls: cannot access 'run-in-docker.sh': Operation not permitted
ls: cannot access 'Dockerfile': Operation not permitted
appveyor.yml  bitrise.yml  CODE_OF_CONDUCT.md  docker-compose.yml    Dockerfile  google_checkstyle.xml  modules  mvnw.cmd  openapi-generator.code-workspace  README.md         samples  sec.gpg.enc    spotbugs-exclude.xml  website
bin           CI           CONTRIBUTING.md     docker-entrypoint.sh  docs        LICENSE                mvnw     new.sh    pom.xml                           run-in-docker.sh  scripts  shippable.yml  Vagrantfile
@snebjorn ➜ /workspaces/openapi-generator (feature/devcontainer ✗) $ whoami
vscode
@snebjorn ➜ /workspaces/openapi-generator (feature/devcontainer ✗) $ 

snebjorn avatar Oct 09 '22 10:10 snebjorn

I can reliably reproduce it using this https://github.com/snebjorn/openapi-generator/tree/37b1132ab917a74249823fe96f3532e85a5881cb/.devcontainer

When changed to https://github.com/snebjorn/openapi-generator/tree/102df74b4cb8d0e8fea14cd3d82ef6d8ff642033/.devcontainer stuff is back to normal

snebjorn avatar Oct 14 '22 18:10 snebjorn

Hi @snebjorn 👋

Could you make the changes mentioned in this comment to snebjorn/openapi-generator repo ? Let me know if that helps.

samruddhikhandale avatar Oct 19 '22 23:10 samruddhikhandale

@samruddhikhandale I made the mentioned changes in the comment, see https://github.com/snebjorn/openapi-generator/tree/test

Then launched it in GitHub Codespaces

@snebjorn ➜ /workspaces/openapi-generator (test) $ ls
ls: cannot access 'openapi-generator.code-workspace': Operation not permitted
ls: cannot access 'sec.gpg.enc': Operation not permitted
ls: cannot access 'mvnw': Operation not permitted
ls: cannot access 'bin': Operation not permitted
ls: cannot access 'CONTRIBUTING.md': Operation not permitted
ls: cannot access 'Vagrantfile': Operation not permitted
ls: cannot access 'docs': Operation not permitted
ls: cannot access 'spotbugs-exclude.xml': Operation not permitted
ls: cannot access 'README.md': Operation not permitted
ls: cannot access 'appveyor.yml': Operation not permitted
ls: cannot access 'LICENSE': Operation not permitted
ls: cannot access 'CODE_OF_CONDUCT.md': Operation not permitted
ls: cannot access 'scripts': Operation not permitted
ls: cannot access 'google_checkstyle.xml': Operation not permitted
ls: cannot access 'website': Operation not permitted
ls: cannot access 'docker-entrypoint.sh': Operation not permitted
ls: cannot access 'samples': Operation not permitted
ls: cannot access 'new.sh': Operation not permitted
ls: cannot access 'bitrise.yml': Operation not permitted
ls: cannot access 'mvnw.cmd': Operation not permitted
ls: cannot access 'pom.xml': Operation not permitted
ls: cannot access 'CI': Operation not permitted
ls: cannot access 'docker-compose.yml': Operation not permitted
ls: cannot access 'run-in-docker.sh': Operation not permitted
ls: cannot access 'Dockerfile': Operation not permitted
ls: cannot access 'modules': Operation not permitted
ls: cannot access 'shippable.yml': Operation not permitted

snebjorn avatar Nov 06 '22 22:11 snebjorn

Hi @snebjorn 👋

Apologies, I'm catching up on this thread right now. Were you able to make any progress? We've recently made changes to the CLI involving image metadata. I wonder if that could have fixed the issue for you or else I'm happy to help.

samruddhikhandale avatar Dec 08 '22 19:12 samruddhikhandale

Closing as stale.

samruddhikhandale avatar Feb 14 '23 23:02 samruddhikhandale

(

olabskid avatar Feb 25 '23 21:02 olabskid

(

olabskid avatar Feb 25 '23 21:02 olabskid