LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   permissions and owner of ntfs mounted drive (http://www.linuxquestions.org/questions/linux-newbie-8/permissions-and-owner-of-ntfs-mounted-drive-682467/)

bloodyscript 11-10-2008 04:32 PM

permissions and owner of ntfs mounted drive
 
hi i mounted a hdd partition as follows in fstab:

/dev/sdb1 /mnt/windows1 ntfs defaults 0 0

now when i try to acess it under my user it states "Unable to enter file:///mnt/windows1. You do not have access rights to this location." so first i tried in terminal:
"chown hraesvelg /mnt/windows1" feedback:"chown: changing ownership of `/mnt/windows1': Read-only file system"

i tried entering the folder in my user and it said the same thing.

so then i decided to do "ls -l /mnt/windows1"

feedback:
-r-------- 1 root root 0 2007-11-15 21:05 AUTOEXEC.BAT
-r-------- 1 root root 194 2007-11-15 20:59 boot.ini
-r-------- 1 root root 0 2007-11-15 21:05 CONFIG.SYS
dr-x------ 1 root root 4096 2007-11-15 21:12 Documents and Settings
-r-------- 1 root root 2145898496 2008-10-16 14:33 hiberfil.sys
-r-------- 1 root root 0 2007-11-15 21:05 IO.SYS
-r-------- 1 root root 0 2007-11-15 21:05 MSDOS.SYS
-r-------- 1 root root 45124 2001-08-23 08:00 NTDETECT.COM
-r-------- 1 root root 222368 2001-08-23 08:00 ntldr
-r-------- 1 root root 390070272 2008-10-16 14:33 pagefile.sys
dr-x------ 1 root root 8192 2008-01-23 12:28 Program Files
dr-x------ 1 root root 4096 2008-06-10 19:47 RECYCLER
dr-x------ 1 root root 4096 2008-02-25 17:26 System Volume Information
dr-x------ 1 root root 0 2007-11-15 16:27 WebCam
dr-x------ 1 root root 28672 2008-10-16 14:37 WINDOWS
dr-x------ 1 root root 0 2007-11-15 22:09 WUTemp
-r-------- 1 root root 146 2007-11-15 21:50 YServer.tx

then i tried "chmod ugo+rx /mnt/windows1"
feedback:"chmod: changing permissions of `/mnt/windows1': Read-only file system"

so from this i determined that sence its a read only file system as stated above in the chown and chmod feedback that im only allowed to acess it as root.

what can i do so that i dont have to be root to acess this drive becuase its almost useless to have it in this computer if i cant acess it under my user.

PTrenholme 11-10-2008 04:51 PM

Well, first you should probably use the 3rd generation NTFS driver, ntfs-3g rather than the older r/o ntfs driver.

Here's how I set up access to the Vista partitions that came with this laptop:
Code:

$ cat /etc/fstab | grep -i ntfs
UUID=342D7D7923AC4107  /Vista                  ntfs-3g rw,defaults    0 0
UUID=2C88743C8874071C  /Vista/Recovery        ntfs-3g rw,defaults    0 0

and here's the access that give me:
Code:

$ ls -l /Vista/
total 6333958
-rwxrwxrwx 1 root root        74 2008-03-10 10:42 autoexec.bat
drwxrwxrwx 1 root root      8192 2008-07-04 08:59 Books
drwxrwxrwx 1 root root      4096 2008-02-07 23:01 boot
-rwxrwxrwx 1 root root    333203 2008-01-20 18:24 bootmgr
-rwxrwxrwx 2 root root        10 2006-09-18 14:43 config.sys
drwxrwxrwx 1 root root          0 2008-03-10 11:12 CVS
drwxrwxrwx 1 root root          0 2006-11-02 05:02 Documents and Settings
-rwxrwxrwx 1 root root 3085791232 2008-11-08 14:56 hiberfil.sys
drwxrwxrwx 1 root root          0 2008-04-08 18:15 HP
-rwxrwxrwx 1 root root        385 2008-03-10 10:19 IPH.PH
drwxrwxrwx 1 root root          0 2008-03-10 10:51 MSOCache
-rwxrwxrwx 1 root root 3399667712 2008-11-08 14:56 pagefile.sys
drwxrwxrwx 1 root root          0 2008-01-20 18:32 PerfLogs
drwxrwxrwx 1 root root          0 2008-07-12 10:29 Pictures
drwxrwxrwx 1 root root      8192 2008-08-14 04:29 ProgramData
drwxrwxrwx 1 root root      12288 2008-09-03 17:03 Program Files
drwxrwxrwx 1 root root      12288 2008-11-08 15:17 Recovery
drwxrwxrwx 1 root root      4096 2008-06-09 16:01 $RECYCLE.BIN
drwxrwxrwx 1 root root      20480 2008-07-30 10:54 SWSetup
drwxrwxrwx 1 root root      4096 2008-06-09 15:51 System.sav
drwxrwxrwx 1 root root      12288 2008-11-08 15:21 System Volume Information
drwxrwxrwx 1 root root      4096 2008-06-09 15:43 Users
drwxrwxrwx 1 root root      61440 2008-07-12 10:31 Wallpapers
drwxrwxrwx 1 root root      24576 2008-10-29 15:05 Windows

If you don't have the driver already installed, it should be in the repositories.

bloodyscript 11-10-2008 05:03 PM

but can your user get access to the drives? and if so how would i find the uuid becuase i hear its a better way to write in the fstab?

plus im not worried about write access the hard drive is full to the maximum all i want to do is to access my videos/pictures/documents music etc.. but i dont want to log in as root and use root as my main user because thats bad security practice so to have this drive in my computer i need user access to it so it would be a practical drive.

David the H. 11-10-2008 05:13 PM

May I suggest that you read up on some of the multitude of other threads that already exist concerning mounting ntfs drives. The "similar threads" box at the bottom of this page should be a good place to start.

As a hint to get you started though, ntfs drives are not able to natively support Linux permissions and ownership. They have to be simulated with various mount options.

bloodyscript 11-10-2008 05:24 PM

sry for posting a similar thread i was just in a hurry to ask the question. and thanx for the help


All times are GMT -5. The time now is 03:29 AM.