Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Everyone likes bashing Vista UAC, but I always thought it was a step in the right direction...

Anyways, I am a newbie as far as Ubuntu goes, but am fairly comfortable with the unix command line. When using the GUI tools I keep running into permission issues all the time. For example, I need to create a folder in /media/ to mount a drive - and I just can't figure out how to do this from within the File Browser. It just has Create Folder grayed out.

If I create a folder on the command line using "sudo", I can't delete it afterwards using the File Browser, for the same reason - permission denied. I know I need admin rights, but HOW do I get them through the File Browser?

What would be really nice is if Ubuntu was smart enough to prompt me for admin elevation, rather than just completely refuse to let me use the GUI for most admin things.

Am I missing something obvious, or is this a real limitation of Ubuntu? (or its file browser?)

share|improve this question
I think you have to have a root file browser - there's definately more segregation than in windows, where the action itself gets elevated, not what's doing it. Of course, leaving a root file manager open leads to scary issues, and Bash is a brilliant tool, so... :P – Phoshi Oct 15 '09 at 20:15
GVFS and the drive manager tool (can't remember it's name) will create temporary mount points for your removable media as needed, based on the partition labels on the media. but of course you need to be logged into X for those to run. – quack quixote Oct 15 '09 at 20:40
up vote 7 down vote accepted

I believe you're searching for nautilus-gksu:

privilege granting extension for nautilus using gksu

The gksu extension for nautilus allows you to open files with administration privileges using the context menu when browsing your files with nautilus.

To install it, enter this command (or use your favorite package manager) and restart gnome (restarting only nautilus might be enough):

sudo apt-get install nautilus-gksu

This adds the context menu item open as administrator when you perform a right click on files or folders in nautilus. It is then allowed to create a folder inside a folder opened as administrator (after having entered your password obviously), as a bonus, you are able to edit as administrator any file you want.

However, I would advise against using such tools. I prefer to administer the file system from the command line, I do much less mistakes that way, being much more attentive (having things written before executing them allows me to check that I don't do anything stupid). But that's a personal choice.

With a GUI, simple tasks are even more simple, but complex tasks are impossible.

You may also create some nautilus script using gksudo for your specific administration tasks. For example, to create a folder as root you could add this script to nautilus scripts:

foldername=$(zenity --entry --title="Create new folder" --text="New folder name:") && gksudo mkdir $foldername

Lets call it ** Make it executable and copy it where nautilus may fint it: chmod +x cp ~/.gnome2/nautilus-scripts

share|improve this answer

You can run File Browser with gksudo. Press Alt + F2 and type gksudo nautilus. Be careful what you do though, you are running the application as root. You may also want to give this a read - File Permissions in Ubuntu - Editing files that belong to root.

But in short, no.

There is no current implementation in Ubuntu which will prompt you for credentials before performing every administration task, you will simply be denied access, that's your key indicator to elevate your privileges using sudo or a similar tool. It has been suggested, but not implemented yet.

share|improve this answer
There are two issues with that. 1 - I don't know how to set things up so that File Browser is always run with gksudo. If I must run it on the command line I might as well just "sudo" whatever action I was trying to do. 2 - this sort of defeats the purpose. I don't want File Explorer to be elevated unless I try to do something that requires admin, at which point I want a prompt for my admin password. Is this possible? – romkyns Oct 15 '09 at 20:22
possible, yes. implemented, not so much. – quack quixote Oct 15 '09 at 20:42
Good links, thanks! – romkyns Oct 15 '09 at 21:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .