PDA

View Full Version : [ubuntu] [SOLVED] Permissions



anderskitson
August 1st, 2008, 05:16 PM
I have a whole drive where the permissions for each folder is set to root, I want to set them to myself, I can go in and right click on each folder and do it that way, is there a way to change permissions on the whole drive?

Darkade
August 1st, 2008, 05:21 PM
Is this your installation hard drive? I ask because it is not wise to change all the permissions of the system files.
Why do you want to change the permissions and to which folder?

howlingmadhowie
August 1st, 2008, 05:24 PM
open a terminal, cd to the directory and then enter:


sudo chown -R your_username:your_username .

and then your password

dca
August 1st, 2008, 05:26 PM
I would recommend only files/directories in /home/myusername are set to that... Everything outside, no...

Paqman
August 1st, 2008, 05:26 PM
I have a whole drive where the permissions for each folder is set to root, I want to set them to myself, I can go in and right click on each folder and do it that way, is there a way to change permissions on the whole drive?

The file manager you're using (Nautilus) will only be running as a user, so won't have permission to modify files owned by root.

You can get around this by temporarily running Nautilus as root. Hit Alt F2 and enter:


gksu nautilus

Don't forget to close Nautilus as soon as you're done modifying things!

decoherence
August 1st, 2008, 05:30 PM
Is this your installation hard drive? I ask because it is not wise to change all the permissions of the system files.
Why do you want to change the permissions and to which folder?

I just want to re-iterate this. If this is the drive you're running ubuntu from, changing the permissions in this way will break things. You should only ever do this on a separate partition that contains only your user data. If that's the case, I'd go with howlingmanhowie's suggestion for being fast and easy. Just MAKE SURE YOU CD TO THE RIGHT DIRECTORY before you run the command or better yet, explicitly specify the path

sudo chown -R your_username:your_username /media/<name of your disk>

Paqman
August 1st, 2008, 05:35 PM
I just want to re-iterate this. If this is the drive you're running ubuntu from, changing the permissions in this way will break things.

+1

Sorry, I just assumed you were referring to a seperate data partition. If that isn't the case, DO NOT change the permissions.

anderskitson
August 1st, 2008, 05:42 PM
wow alot of replies, um its just folders i copied to a new hardrive that kept the permissions, so nothing important

anderskitson
August 1st, 2008, 05:43 PM
The file manager you're using (Nautilus) will only be running as a user, so won't have permission to modify files owned by root.

You can get around this by temporarily running Nautilus as root. Hit Alt F2 and enter:


gksu nautilus

Don't forget to close Nautilus as soon as you're done modifying things!

thats what i was doing when i was right clicking and changing permissions

anderskitson
August 1st, 2008, 05:48 PM
open a terminal, cd to the directory and then enter:


sudo chown -R your_username:your_username .

and then your password

Thanks Exactly what I wanted

Paqman
August 1st, 2008, 05:53 PM
thats what i was doing when i was right clicking and changing permissions

If use the button at the bottom marked "Apply permissions to enclosed files" you can chmod/chown the whole disk. It works the same as "chown -R" in the command line.

anderskitson
August 1st, 2008, 08:55 PM
The funny thing is I was doing that and it wasn't changing them

never mind that works too, I just had to close it then go back and click apply for some reason