PDA

View Full Version : [ubuntu] Changing ownership of devices



Fracta
January 8th, 2011, 11:48 AM
I have a hard drive that I want to set permissions for, but it never lets me. For example, there is a pagefile.sys and I want to set the owner to root to make sure it is never touched, but I can't do it, even with the terminal.
This is the first step towards getting a folder that only particular users can access, that is also shared on the local network but still password protected, so the same users can access it from a different pc.
Sorry if this is in the wrong place, its not really a networking question yet.
Thanks for your help

nomko
January 8th, 2011, 12:19 PM
I have a hard drive that I want to set permissions for, but it never lets me. For example, there is a pagefile.sys and I want to set the owner to root to make sure it is never touched, but I can't do it, even with the terminal.
This is the first step towards getting a folder that only particular users can access, that is also shared on the local network but still password protected, so the same users can access it from a different pc.
Sorry if this is in the wrong place, its not really a networking question yet.
Thanks for your help



Try this:
sudo chmod -R 777 /media/***

Where *** is the device name (i.e. sda1 or sdb1) or label (see the folder /media which label the drive has).

Krytarik
January 9th, 2011, 02:24 AM
Judging from the "pagefile.sys" you are apparently talking about a FAT or NTFS filesystem. You cannot apply linux permissions to those filesystems, at least not for specific files/directories, only partition-wide through the mount options.

Greetings.

@nomko: Eh?! :-s

Fracta
January 9th, 2011, 10:51 PM
"You cannot apply linux permissions to those filesystems"
Thank you! That explains everything.