Ubuntu – How to modify a file that is owned by root

guiprivilegesroot

I installed a program that runs in a browser. I would like to change the background picture it puts up on the screen or modify the existing one. The properties for that file tell me that it is owned by root.

I am running Ubuntu 12.04 really using Linux for the 1st time.
I am trying to make the switch from Windows and finding it laborious 🙂

How can I change that picture file using the GUI? How do I do this with root privileges?

Best Answer

Assuming you are the owner of the operating system in question then you can do something relatively simple. Also assuming the current file is owned by root and group of root then in a terminal you can:

sudo chown your_user:root /path/to/file

You may now edit this file using your normal GUI login.

Once you're done, remember to set it back

sudo chown root:root /path/to/file

To find out more about changing ownership of files see:

man chown

Opening a terminal can be as simple as opening the application bar (name?) and typing "terminal". Using sudo you will be asked for your password to grant you elevated privileges for making the change. See:

man sudo
Related Question