Open file in editor with sudo #5212
Replies: 3 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 |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
Also checking in on this… would be a great addition to code-server. 🙏 |
Beta Was this translation helpful? Give feedback.
-
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?
Beta Was this translation helpful? Give feedback.
All reactions