I am trying to edit some apache configuration files in a server. I would like to use VS code ssh plug in, but I have not found a way to save the configured file, since I am logging into the VM as a user (with sudo permissions) but not root! I get a permission denied error.
I guess there must be a way to just edit the file from VS code (I also tried winSCP, but no result) and when I save the changes, save them as a sudoer.
I heard from a friend that when he tried to save the file from VScode, there is a promt to retry as sudo. I do not get that, and unfortunately I do not now any more details, other than he s using Macintosh.
Suggestions I came across and I do not like:
- Change file ownership
- Enable root log in
Suggestions I tried
- Tweak with the plug in (Tried to force sudo su as first command, configuring extention.js but there is an error that it writes in an empty pipe)
- Using winSCP
If someone has a suggestion of using another tool, I am happy to hear it.
Specs
Server runs Ubuntu 18, apache and my PC windows 10. If any other spec is required I will edit this section.
TLDR.
I need a way to edit a file owned by root, having logged in in as a user with root permissions. I would like to do it through a UI interface since I find difficult editing and creating multiple files through nano/vi.