Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'd like to give an already running process sudo permissions so that it can make certain system calls. Is this possible?

share|improve this question
2  
I think you have to stop & start the process again (here's some additional info...... –  cp2141 Mar 14 '13 at 23:35
    
That's disappointing. –  R.D. Mar 15 '13 at 0:48
    
it wouldn't be a good idea to just change the effective permissions on a running executable without a way to notify it that it has been done so. Some applications have interactive support to dynamically raise permissions with a user prompt. –  cp2141 Jun 17 '13 at 18:23

2 Answers 2

you can also do these by giving the permission for background process to run with sudo permission by

sudo fg

for foreground and with process name that will be good i think so

share|improve this answer

You can try using tee. There are various examples on the page in the link. I use it when I forgot to type sudo before editing a local file in vim with

!w sudo tee %
share|improve this answer
    
This is vim specific right? I was looking for something more generic –  R.D. Mar 15 '13 at 20:21
    
That is a vim specific-example, yes. The examples from the link are not; they run the gamut of apps. Though all of them involved tee and sudo, for some it is not possible after having called the app from the command line. –  Jerry W Jackson Mar 16 '13 at 17:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.