Change the Owner of a Running Process

Roger Oberholtzer roger
Mon May 17 11:32:35 PDT 2004


If the app belongs to root (chown root 'app'), then setting the SUID
bit (chmod +s 'app') should result in the program running as root and
not whoever mozilla is running as. Or whoever the app file belongs to.

However, do heed the warnings below. I would never do this with
an app I got somewhere. There are few cases where this is needed.

If you just want to control app files so they do not belong to the
user running mozilla, consider using the 'guest' account or some other
non-privleged account. Do the same two commands listed above, replacing
root with guest. 


On Fri, 31 May 2002 17:50:23 -0400 (EDT)
Net Llama! <netllama at linux-sxs.org> wrote:

> On Fri, 31 May 2002, Jason Joines wrote:
> >      Is there anyway to change the owner of a running process?  I have a
> > kiosk machine that only runs mozilla under the ID of browser.  I would
> > like to change the owner of the process to root once mozilla has
> > started so that users would not be able to kill the browser.
> 
> I'm not sure that what you're trying to do is possible.  And even if it
> was, i think it would be extremely dangerous.   For starters, i don't
> think having root own the process would prevent someone from killing the
> browser.  You can't really control who does what with an X app once its on
> the screen & running.  Also, if the browser was running as root, the
> person could gain access to the entire filesystem, with the ability to
> alter it.
> 
> -- 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Lonni J Friedman				netllama at linux-sxs.org
> Linux Step-by-step & TyGeMo		     http://netllama.ipfox.com
> 
> _______________________________________________
> Linux-users mailing list -
> http://linux-sxs.org/mailman/listinfo/linux-users
> Subscribe/Unsubscribe info, Archives,and Digests are located at the above
> URL.


-- 
+============================+===============================+
| Roger Oberholtzer          |   E-mail:        roger at opq.se |
| OPQ Systems AB             |      WWW:  http://www.opq.se/ |
| Erik Dahlbergsgatan 41-43  |    Phone: Int + 46 8   314223 |
| 115 32 Stockholm           |   Mobile: Int + 46 733 621657 |
| Sweden                     |      Fax: Int + 46 8   302602 |
+============================+===============================+




More information about the Linux-users mailing list