LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-08-2006, 05:55 PM   #1
sureshot324
Member
 
Registered: Mar 2004
Posts: 49

Rep: Reputation: 15
Why can't I set user read access for mounted ntfs drives?


I've put these lines in my fstab to mount my windows partitions:

/dev/hda1 /mnt/c-drive ntfs ro,auto,user 0 0
/dev/hdb1 /mnt/d-drive ntfs rw,auto,user 0 0

This mounts them successfully, but I can only access them as root. Even when I am root, it won't let me change the permissions, since it says they are read only drives. As you can see I did specify hdb1 to have write access, but I guess linux ntfs doesn't have write support yet. I don't want to have to log in as root every time I access these drives, especially since I won't have write access anyway and can't do any harm.

When I have those drives mounted, doing and ls -l on the /mnt folder shows this:

dr-x------ 1 root root 8192 2006-01-08 15:38 c-drive
drwxr-xr-x 2 root root 4096 2006-01-07 22:42 common
dr-x------ 1 root root 4096 2006-01-08 15:39 d-drive

and I am unable to change the permissions of c-drive or d-drive, even as root. If I unmount the drives, the permissions automatically change to this:

drwxr-xr-x 2 root root 4096 2006-01-07 22:47 c-drive
drwxr-xr-x 2 root root 4096 2006-01-07 22:42 common
drwxr-xr-x 2 root root 4096 2006-01-08 16:56 d-drive

Anyone know how I can get read access to these drives as a regular user?
 
Old 01-08-2006, 06:51 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,978
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
The key is in the umask value.



Have a search, this is asked and answered all the time.


Cheers,
Tink
 
Old 01-08-2006, 07:00 PM   #3
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 151Reputation: 151
You'll need to check your kernel to see if you have write support for ntfs compiled in, you've obviously already got read support.

Check the man page for mount - as well as the umask option mentioned by Tinkster you'll probably need to set either uid or gid. From the man page under Mount options for ntfs:

Quote:
uid=value, gid=value and umask=value
Set the file permission on the filesystem. The umask value is given in octal. By default, the files are owned by root and not readable by somebody else.
 
Old 01-08-2006, 08:23 PM   #4
sureshot324
Member
 
Registered: Mar 2004
Posts: 49

Original Poster
Rep: Reputation: 15
Added umask=000 to the mount options and now it's working fine. How is ntfs write support these days, is it safe to use?
 
Old 01-08-2006, 08:39 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,978
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
Not according to the documentation for the kernel. If you
use the ntfstools from sourceforge it's a whole different
story, though :}


Cheers,
Tink
 
Old 01-08-2006, 08:49 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,271

Rep: Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028
Nope ... not last time I tested (2.6.13)

Edit: - just rechecked the site after seeing Tinks post. Think I have a 2.6.15 system laying around somewhere - might be time to re-test.

Last edited by syg00; 01-08-2006 at 09:01 PM.
 
Old 01-08-2006, 10:42 PM   #7
sureshot324
Member
 
Registered: Mar 2004
Posts: 49

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Tinkster
Not according to the documentation for the kernel. If you
use the ntfstools from sourceforge it's a whole different
story, though :}


Cheers,
Tink
Is ntfstools completely seperate from the ntfs support in the kernel? I might have to check that out, because it would be very convenient if I could write to ntfs partitions reliably and without risk of corrupting the data on those partitions.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Users can't access mounted drives NosLycn Linux - Software 4 04-01-2005 03:37 PM
Hard drives are mounted but don't know how to access them johnharlin Linux - Newbie 1 08-13-2004 02:58 AM
Allowing read/write on mounted captive-ntfs partition divsky Linux - General 6 04-15-2004 10:52 AM
Mounted drives are read only for non-root edawad Linux - Newbie 1 01-11-2004 10:30 PM
cant access mounted drives when logged in as a user Shantesh Linux - General 1 12-25-2003 08:07 PM


All times are GMT -5. The time now is 09:05 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration