Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

I'm a new convert to Linux and am building a new server using Ubuntu 12.04 (home network, server will be file storage and will run PHP/MySQL for my web development projects).

I am really struggling.

The first thing I thought I'd try is to install Samba so I could share the file directories on my network, but when I try to edit the config file to name the shared directory, it says I can't save it as I'm not the owner. Looking at the permissions also tells me I'm not the owner (who is?).

I've Googled for hours and tried various suggestions, none seem to work.


share|improve this question
You edit system configuration files from th terminal with sudo nano or using the GUI with gedit (or whatever text editor you like) using gksu (in Gnome), system file sare owned by root. – Uri Herrera Sep 8 '12 at 17:47
When I try with gedit (in the GUI); it lets me open it, but not save my edits, if I try to do a save-as, and overwrite the file it says I don't have permission to do so. – RichHead Sep 8 '12 at 17:48
Use gksu gedit. – Uri Herrera Sep 8 '12 at 17:51
I did say I was a noob, I have no option for gksu edit in the gui, when I enter that in terminal it asks for my password, then returns me to the prompt. – RichHead Sep 8 '12 at 17:55
I thought I was being stupid, so changed directory to etc/samba and issued the command: gksu edit smb.conf; I was asked for password, which I entered; then received this error message: no "edit" mailcap rules found for "application/octet-stream" ... – RichHead Sep 8 '12 at 18:04

Please start a terminal with Alt-Ctrl-T.

Then enter the command:

gksu gedit <configfile-path-and-name> &

you will be prompted for your password. After entering it an editor will open on your desktop. Make your changes and then use the menu to save the file. Because of the way you started it, you will now have the permission necessary to save the file.

There are additional editors available in the Ubuntu Software Center, for example TeaInstall Tea

share|improve this answer

Your Answer


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.