Open file in editor with sudo #5212
Unanswered
LaCocoRoco
asked this question in
Q&A
Replies: 4 comments 6 replies
|
Hmm 🤔 I'm not sure to be honest. I found this but I don't think it's much different from your current workaround |
5 replies
|
Hi there! Any luck on this? I am connected to Ubuntu 22.04 via remote VSCode, I am trying to edit files for other user, which I don't want to change their file permission for me to edit their files normally. As of now I use Vim when editing files and Save as Root in Remote - SSH which can be hassle sometimes. |
0 replies
|
Also checking in on this… would be a great addition to code-server. 🙏 |
1 reply
|
Incase anyone else is looking to do the same you can run |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Sometimes i need to edit a file with sudo (Example: Adding new reverse proxy into caddy file).
I am fine by editing the file with sudo nano in the terminal, but it would be very convenient to open it in the running code server editor.
One workaround is to spawn a new code-server instance as sudo on a different port with the working directory pointing to root.
Does someone know if there ia a way to open a file or folder with sudo in the editor?
All reactions