Skip to content

Read-only --extensions-dir break remote extension installation #151543

Open
@bjornfor

Description

@bjornfor

Does this issue occur when all extensions are disabled?: No. (The issue is about installing extensions on a remote system.)

  • VS Code Version: 1.67.2
  • OS Version: Ubuntu 18.04

Steps to Reproduce:

  1. Start VSCode with code --extensions-dir /path/to/read-only-tree-of-extensions. (Why read-only? Because that's how Nix does software deployment. This command just reproduces how vscode-with-extensions from Nixpkgs works.)
  2. Check that the extensions from the local tree is available.
  3. Open a remote ssh connection and try to install one of the local extensions to the remote system.
  4. VSCode errors out with Unable to write file '/home/$USER/.vscode-server/extensions/.6661fce6-c826-4679-8f01-8421850781b5/package.json' (EntryWriteLocked (FileSystemError): Error: EACCES: permission denied, open '/home/$USER/.vscode-server/extensions/.6661fce6-c826-4679-8f01-8421850781b5/package.json')

It seems VSCode first copies files from the local system /path/to/read-only-tree-of-extensions to ~/.vscode-server/ on the remote host and then tries to update ~/.vscode-server/extensions/.UUID/package.json (still on the remote), which fails because the file still has read-only permissions.

I tried to chmod the files myself, but it seems VSCode creates a new UUID every time, so it doesn't work.

When copying extensions/files from somewhere to $HOME on a remote machine, with the intention to update some of the files, I think it's reasonable to explicitly set the writeable bit on said files, after the copy operation completes.

Metadata

Metadata

Assignees

Labels

extensionsIssues concerning extensionsunder-discussionIssue is under discussion for relevance, priority, approach

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions