cannot save system files

Asked by BillQuillinan

I am attempting to save add_Window.py file to my usr/share/blender/scrips/addons directory from the page http://usetheblender.net/sunroom-tutorial

When I navigate to the proper folder and press OK on the save dialog box, nothing happens.

I try to save the file (a plain vanilla text file) by opening it with gedit and saving using the gedit save as function, but when I try this I get an error message saying I do not have sufficient permissions. I can save it to my desktop, (and have done so) but I cannot use it from there, since Blender looks in the addons folder for scripts.

What do I have to do to get 'sufficient permission' to copy this file to the folder it needs to be in? This is my home computer, there are no other users.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Vanamali
Solved:
Last query:
Last reply:
Revision history for this message
Vanamali (vanamalishastry) said :
#1

To make any changes to the system files, you need to access them as root.
Try 'sudo gedit /whatever/path/file name' from the terminal. Provide your
password when prompted. Edit the file to your satisfaction and save. This
should work.

Revision history for this message
BillQuillinan (qwq-t) said :
#2

I will try that, then.

What should I do in the case when the file I need to move is not a text file? Or, what should I do to avoid having to save this file somewhere accessible on my system then moving it to where it belongs?

My original problem was the inability to download a new file for a system folder from a website. Using gedit is a workaround. In general, then, how do I 'access them as root'?

The file is on my desktop at present. Is there not a simple way to move the file to the usr/share/blender/scrips/addons folder?

Revision history for this message
BillQuillinan (qwq-t) said :
#3

I opened a terminal and entered
              :~$ sudo gedit /home/Desktop/add_Window.py
after entering my password I got this:
             (gedit:32512): IBUS-WARNING **: The owner of /home/bill/.config/ibus/bus is not root!

Gedit opened but did not load the file, although it had a tab for add_Window.py. I closed that window and used the gedit menu to open the file from my desktop, then used the save as function to navigate to the addon folder and save the file there.

I have confirmed the file is in place and working as advertised. So my immediate problem is solved. However, I really do not understand why what I did worked, or really what I did. So I am not currently in a position to generalize on this and avoid having to return to this forum next time something similar but not identical comes up.

Is there anyone who can explain this to me, or point me in the direction of something a non-linux person who does not speak C++ can read to find out what is going on with this?

Thanks in advance.

Revision history for this message
Vanamali (vanamalishastry) said :
#4

For any general file, you can copy the file to the required location by the
command 'sudo cp <source_location> <destination_location>' (for more
details on the command cp try 'man cp'). I suggest, you download the file
to Downloads folder (or somewhere other than the system folder) and then
copy the files to the relevamt system folder using the cp command.
On Sep 17, 2013 10:21 AM, "BillQuillinan" <
<email address hidden>> wrote:

> Question #235848 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/235848
>
> Status: Answered => Open
>
> BillQuillinan is still having a problem:
> I will try that, then.
>
> What should I do in the case when the file I need to move is not a text
> file? Or, what should I do to avoid having to save this file somewhere
> accessible on my system then moving it to where it belongs?
>
> My original problem was the inability to download a new file for a
> system folder from a website. Using gedit is a workaround. In general,
> then, how do I 'access them as root'?
>
> The file is on my desktop at present. Is there not a simple way to move
> the file to the usr/share/blender/scrips/addons folder?
>
> --
> You received this question notification because you are an answer
> contact for Ubuntu.
>

Revision history for this message
Best Vanamali (vanamalishastry) said :
#5

When you want to modify the system files or folders, the OS asks for root
access. This is to prevent unauthorised modification of your system by
malwares or by other users who do not have root access. Its a part of the
security system in place for the OS. When you entered 'sudo gedit', you
told the terminal that you are providing root access to the program gedit
and hence authorised the program gedit to modify the system files. Hence,
you could save the file to the folder you had mentioned. For more on root
access try 'man sudo' from your terminal or check www.sudo.ws/sudo/
Also check https://help.ubuntu.com/community/Sudoers

Revision history for this message
BillQuillinan (qwq-t) said :
#6

Thanks Vanamali, that solved my question.