Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Actually i'm trying to copy some business purpose files into root folder but it's not allowing to access the root folder. When i'm trying to change the permissions of the folder, its showing that you are not the owner so that you cant change the permissions of this directory. Please help me..

share|improve this question
    
I'd think twice before trying to change permissions outside the home folder. More often then not, it will break things, and you don't need to do it to copy files. askubuntu.com/questions/29181/… –  mikewhatever Feb 17 '12 at 6:25
    
It is not advised to change the ownership of the root filesystem itself(not sure if you can do that). You could create a directory and put the files inside that, instead of the root filesystem and share the directory if need be. Anyways, if you are still insisting that it needs to be done, try sudo cp <filename-to-be-copied> / You could also type gksudo nautilus to open the file browser and copy the file with a graphical interface. If you absolutely need to change the permissions, take a look at askubuntu.com/questions/6723/… –  nitstorm Feb 17 '12 at 6:28
    
don't do it. make a dump sub-directory in /opt or something...but don't go messing about with permissions for /...or most any folder that contains other folders you don't personally populate and control –  hbdgaf Feb 17 '12 at 6:41
add comment

3 Answers 3

Hmm... instead of explaining how to change permissions on the root folder I'll just say "you should not copy business-purpose files anywhere outside your home folder"

Your home folder is for your files. Folders outside your home folder are for system files. Changing permissions of those folders is not considered a good practice.

Having said that, if you still want to copy files, you can do this by starting file manager in superuser mode by pressing Alt-F2 and typing gksu nautilus.

It'll ask you for your administrative password, after which you'll be able to copy files.

share|improve this answer
    
Wow its working.. Thanku so much for the speed responce and help.. –  V Pranaya Theja Feb 17 '12 at 6:43
add comment

You should not, IMO, be changing ownership or permissions on system file, including /root.

If you need to copy files to /root use sudo or gksu

sudo cp file /root

gksu nautilus

See:

https://help.ubuntu.com/community/RootSudo

https://help.ubuntu.com/community/FilePermissions

share|improve this answer
    
Thanku so much.. got the solution.. –  V Pranaya Theja Feb 17 '12 at 6:44
add comment

In order to change anything that require root permissions "Superuser" you must have root access capabilities. This must be done by providing the root password in order to change the files. You can either do this in a few different ways. Examples:

sudo -s

After typing the following command it will prompt your for the root password in which you will provide and hit enter. If it is accepted then you will have full capabilities to do whatever you want on the system.

Another way is to use sudo before every command that requires root permissions. Example:

sudo chmod 755 /etc/passwd

In which this case /etc/passwd is a file that is read only to all users besides root and requires root permissions in order to change. After typing this command you will still be prompted for a root passwd.

share|improve this answer
    
I should also add that if you are asking this question, then you probably shouldnt be changing any files or folders that require root permissions and that you should ask your sys admin to help you with the situation –  Scott Stookey Feb 17 '12 at 6:29
    
Why would you chmod /etc/passwd?? –  mikewhatever Feb 17 '12 at 6:36
    
Just a file off the top of my head. Used for example –  Scott Stookey Feb 17 '12 at 6:38
    
Thanku so much.. got the solution –  V Pranaya Theja Feb 17 '12 at 6:44
add comment

Your Answer

 
discard

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.