Is it possible to give root to an already running application which runs at userspace?
Like x
program is running, I did some unsaveable work on x
program, But it needs root to complete. I do not want to restart the x
program.
No.
What you have to do is save the work somewhere you can write to, e.g. /tmp
, exit the program, run the program with sudo x
, and read the data from /tmp
.
Or, in vi
or vim
, you can do :w | sudo tee root-writeable-file