{"id":149,"date":"2007-08-03T00:39:07","date_gmt":"2007-08-03T00:39:07","guid":{"rendered":"http:\/\/ubuntucat.wordpress.com\/2007\/08\/03\/file-browser-privilege-escalation-done-right\/"},"modified":"2010-02-03T19:10:01","modified_gmt":"2010-02-03T23:10:01","slug":"file-browser-privilege-escalation-done-right","status":"publish","type":"post","link":"https:\/\/www.psychocats.net\/ubuntucat\/file-browser-privilege-escalation-done-right\/","title":{"rendered":"File Browser Privilege Escalation Done Right"},"content":{"rendered":"<p>Even though there is <a href=\"https:\/\/bugs.launchpad.net\/nautilus\/+bug\/12154\">a bug report on this for Nautilus,<\/a> I didn&#8217;t include proper implementation of privilege escalation as one of <a href=\"http:\/\/www.psychocats.net\/ubuntucat\/the-top-5-gnomeubuntu-usability-bugs-id-love-to-see-fixed\/\">The Top 5 Gnome\/Ubuntu Usability Bugs I\u2019d Love to See Fixed<\/a> (well, it would then be six instead of five, anyway)&mdash;mainly because it&#8217;s not unique to Gnome. <\/p>\n<p> I haven&#8217;t seen proper file browser privilege escalation implemented in Gnome, KDE, or Xfce. I haven&#8217;t seen it done well in Windows XP or Mac OS X, either.  <\/p>\n<p> Right now in Windows XP, if you&#8217;re not the administrator (and, for safety&#8217;s sake, you really <i>shouldn&#8217;t<\/i> be logged in as the administrator), there&#8217;s no easy way to temporarily become the administrator to edit a file or two. You can&#8217;t right-click the file and <i>Open as&#8230;<\/i> a different user. You can&#8217;t right-click Explorer and <i>Run as&#8230;<\/i> a different user. Basically, unless there&#8217;s something I don&#8217;t know about (Windows fans, please pipe up! I have to use Windows at work, and it&#8217;d be great to know if a solution exists), you have to log out of the current user, log in as the administrative user, make the change, and log back in again as the original user. <\/p>\n<p> Same deal for Mac OS X. You can&#8217;t just open Finder as an administrator. In fact, because Mac OS X has a better security implementation (it uses <i>sudo<\/i>, same as Ubuntu) than XP&#8217;s, even an administrator can&#8217;t modify system files through Finder. You have to enable the root account and use its Finder, or make changes  through the terminal.  <\/p>\n<p> Desktop Linux has one up on Windows and Mac in this regard, but it&#8217;s still not completely smooth. If you know you&#8217;re going to modify a system file, you can launch your file browser window with root (or administrator) privileges even within a regular account. If you have Konqueror plugins, Nautilus scripts, or Thunar custom actions, you can right-click on a system file and edit it as root. <\/p>\n<p> To be fully smooth, file browsers should have drag-and-drop authentication. <\/p>\n<p> In other words, a Ubuntu user, for example, who happens to be in the <i>admin<\/i> group (meaning that she can <i>sudo<\/i> to temporarily gain root privileges for a particular task) can drag a file to a system folder and instead of getting the old <b>Access denied: You do not own that folder<\/b> warning, she gets an authentication dialogue: <\/p>\n<ul>\n<li>Modify system folder (you will be prompted for a password)\n<li>Do not modify the system folder<\/ul>\n<p> Likewise, when someone who is in the <i>admin<\/i> group opens a system file and tries to save it, instead of getting <b>Unable to save: you are not the owner of the file<\/b>, he&#8217;ll get an authentication dialogue to make changes to the system file. <\/p>\n<p> That&#8217;s how it should go. It&#8217;s smooth. It makes up for you forgetting to open the file with root privileges. It allows you to back out if you don&#8217;t want to modify the system file. And it wouldn&#8217;t appear for users who aren&#8217;t sudoers&mdash;they <i>would<\/i> get the <b>Access denied<\/b> error message. <\/p>\n<p> More importantly, it wouldn&#8217;t frustrate the hell out of new users who then &#8220;yell&#8221; on the forums &#8220;What does it mean I&#8217;m not the owner of the file? I&#8217;m the only person using this computer! I own every file on the system!!! Why can&#8217;t I be root?&#8221; Or, worse yet, when told she&#8217;s not the owner of the system files, the new user might attempt to change ownership of the system files, thus rendering her installation non-functional.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Even though there is a bug report on this for Nautilus, I didn&#8217;t include proper implementation of privilege escalation as one of The Top 5 Gnome\/Ubuntu Usability Bugs I\u2019d Love to See Fixed (well, it would then be six instead of five, anyway)&mdash;mainly because it&#8217;s not unique to Gnome. I haven&#8217;t seen proper file browser&hellip; <a class=\"more-link\" href=\"https:\/\/www.psychocats.net\/ubuntucat\/file-browser-privilege-escalation-done-right\/\">Continue reading <span class=\"screen-reader-text\">File Browser Privilege Escalation Done Right<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,21],"tags":[],"class_list":["post-149","post","type-post","status-publish","format-standard","hentry","category-linux","category-ubuntu","entry"],"_links":{"self":[{"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/posts\/149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/comments?post=149"}],"version-history":[{"count":1,"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/posts\/149\/revisions"}],"predecessor-version":[{"id":1918,"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/posts\/149\/revisions\/1918"}],"wp:attachment":[{"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/media?parent=149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/categories?post=149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.psychocats.net\/ubuntucat\/wp-json\/wp\/v2\/tags?post=149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}