Description
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:
- 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 howvscode-with-extensions
from Nixpkgs works.) - Check that the extensions from the local tree is available.
- Open a remote ssh connection and try to install one of the local extensions to the remote system.
- 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.