Re: sudo vs. gksu



Michael R. Head wrote:

On Sat, 2008-04-05 at 15:28 +0200, Mario Vukelic wrote:
On Sat, 2008-04-05 at 14:11 +0100, Tony Arnold wrote:
Can you explain how this problem is avoided with gksu, or gksudo? So
far as I can see using one of these causes the application to run with
UID of 0, i.e., root. The app has no knowledge of how it was invoked,
so any files is creates will be owned by root.

Your explanation applies to running any app, not just graphical ones.

http://www.psychocats.net/ubuntu/graphicalsudo

That page says that "sudo nano /etc/apt/sources.list" is a good idea.
It isn't, and for the same reason graphical apps shouldn't be run
through sudo -- nano will create/edit extra files in your home
directory. In fact, there's a command called "sudoedit" which solves the
problem.

Note that with most such situations, it's only a problem if the first time
you use the app you do it with sudo. If you already own the .nano, or
whatever, files then they don't get "reowned" by root (at least not ime).
But I admit I fairly regularly discover some hidden file in my home
directory owned by root - and know that "sudo" was the reason.
--
derek


--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • Re: Newbie wants Firefox and Tbird
    ... > I've yet to see an X app that needs me to have root. ... >this is just as problematic with sudo. ... >take a red flashing prompt, just the same information you'd have with sudo. ...
    (Debian-User)
  • sudoedit - good catch! was [Re: sudo vs. gksu ]
    ... files is creates will be owned by root. ... Your explanation applies to running any app, ... there's a command called "sudoedit" which solves the ... Here I was thinking that there was a bug in nano that made the ...
    (Ubuntu)
  • Re: Dependency tracking application
    ... this with a regular dimension or parent-child ... required to actively Use the app. ... An app cannot exist sans a server. ... Baring that, I think the server would be at the root, and the apps ...
    (microsoft.public.sqlserver.olap)
  • Re: Converting ASP site to .NET
    ... you limit how and where your app ... > Previously I had my server set up so that the root folder of my web was ... > So I changed IIS to use "wwwroot" as my home directory and using VS ... > Should I just replace my absolute paths with relative paths? ...
    (microsoft.public.dotnet.general)
  • Re: su, sudo, ssh, permissions question
    ... > The app does hw and system file access, so needs root priviledge. ... > Remote login is provided using ssh for admin. ... > allows me to autologin as root (if root has no pwd), ...
    (alt.os.linux.redhat)