LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 05-12-2003, 10:01 AM   #1
Coramoor
LQ Newbie
 
Registered: May 2003
Distribution: Slackware v. ?
Posts: 5

Rep: Reputation: 0
Howto: set permissions on a ntfs drive.


How do I set permissions when mounting a ntfs drive(which is dead set on being read-only).

All my mp3s are on my windows drive and i can only get there as root which is really annoying...

Keep in mind that I'm a newbie so if it's very complicated you don't have to bother.
 
Old 05-12-2003, 10:04 AM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
NTFS support is read only. Do you just want to be able to access the drive as a normal user? If so you'll probably just need to chmod whatever directory you are using as a mount point (say /mnt/ntfsDrive) to 755. (so to follow the example - chmod 755 /mnt/ntfsDrive && mount /dev/hdXN /mnt/ntfsDrive)

HTH

Jamie...
 
Old 05-12-2003, 10:42 AM   #3
Coramoor
LQ Newbie
 
Registered: May 2003
Distribution: Slackware v. ?
Posts: 5

Original Poster
Rep: Reputation: 0
That's just it.. I can't because it's read-only.
 
Old 05-12-2003, 10:44 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 39,857

Rep: Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121
Quote:
NTFS support is read only.
or rather, you can write to it with a lot of farting around, but it's very likely that you'll damage the drive, so we don't normally tell you.

there's a lot of information abuot NTFS on this site, try a little search
 
Old 05-12-2003, 11:06 AM   #5
Seph64
Member
 
Registered: Feb 2003
Distribution: Gentoo, FreeBSD, LFS
Posts: 295
Blog Entries: 20

Rep: Reputation: 30
You have to edit the way you mount it to read it from a regular user. I am going to assume Windows is on the first drive

mount -t ntfs /dev/hda1 /mnt/windows -r -o umask=022

That usually works when mounting it.

For the fstab, I usually put in:

Code:
/dev/hda1       /mnt/windows     ntfs     ro,umask=000   0 0
 
Old 05-12-2003, 03:30 PM   #6
chemzar
LQ Newbie
 
Registered: May 2003
Location: Storrs, CT
Distribution: Slackware 9.0
Posts: 13

Rep: Reputation: 0
If that doesn't work try using umask=0000 (an extra leading zero for the directory bits). After you modify /etc/fstab then you will want to

umount /dev/hda1
mount -a

This will effect the changes that you made by remounting your windows directory. If you want to be more careful you can disable write so that you don't mess up your data (I do this cuz im paranoid) by using umask=0222.

Hope this helps.
 
Old 05-12-2003, 07:46 PM   #7
Alan Hicks
LQ Newbie
 
Registered: Jun 2002
Location: Lizella Georgia
Distribution: Slackware
Posts: 7

Rep: Reputation: 0
Quote:
mount -t ntfs /dev/hda1 /mnt/windows -r -o umask=022
umask 022 only removes the write permission for everyone but the owner. On a read-only ntfs drive this is foolish. Since you're wanting to mount it so that a normal user can access it instead of just root, take a look at the man page for mount. Pay particular attention to the part about gid and uid options to mount. The default is to set the owner of all files in the filesystem if no owner is specified as root. You can change this with uid.
 
Old 05-12-2003, 10:32 PM   #8
TheDot
Member
 
Registered: May 2003
Location: Bored-in-ME, US
Distribution: Slackware 3-10, EOF
Posts: 59

Rep: Reputation: 15
Cool Let me see if I can shed a little light on this subject...

*cracks his knuckles and begins to type...*

First off, you have to have NTFS file system write support in your kernel.

Second, read the following.

Now, this is taken from the configuration for choosing NTFS file system write support in kernel configuration:
Quote:
CONFIG_NTFS_RW:

If you say Y here, you will (maybe) be able to write to NTFS file
systems as well as read from them. The read-write support in NTFS
is far from being complete and is not well tested. If you say Y
here, back up your NTFS volume first, since it will probably get
damaged. Also, download the Linux-NTFS project distribution from
Sourceforge at <http://linux-ntfs.sf.net/> and always run the
included ntfsfix utility after writing to an NTFS partition from
Linux to fix some of the damage done by the driver. You should run
ntfsfix _after_ unmounting the partition in Linux but _before_
rebooting into Windows. When Windows next boots, chkdsk will be
run automatically to fix the remaining damage.

Please note that write support is limited to Windows NT4 and
earlier versions.

If unsure, say N.
Basically, to sum it up, if you're running WindozeXP as your other operating system, that is NT5, then you'll never mount it as writable, until support changes later. However, if you're using NT4 (or earlier), this is how you would mount it for users to write to it:
Code:
/dev/hdxn        /dirname               ntfs        uid=0,gid=100,umask=002   1   0
(hdxn... x and n being the letter and number for the partition that ntfs resides on, in my case, this would look like /dev/hda1)
(/dirname being the folder you want to mount the partition under)

But, as it says above, use the fix utility how it says to use it! You'll save yourself a lot of trouble.

That should give you a good starting, if nothing else.

Good luck!

Last edited by TheDot; 05-12-2003 at 10:34 PM.
 
Old 05-12-2003, 10:51 PM   #9
lostboy
Member
 
Registered: Mar 2003
Location: Florida
Distribution: Slackware 9.1,10.1
Posts: 268

Rep: Reputation: 30



From what I've read, the umask option in fstab is the only way to mount the drive in a state that you will be able to make permission changes, and have them actually do anything. The state in which a FAT or NTFS drive mounts is determined by microsoft. It has a default setting. Microsoft handles drives a bit differently, and since I'm not qualified to go into detail, I won't. When you mount the drive in Linux, with the umask bits =0000 , you are un-doing the default state, and setting the drive to a neutral state . Then you can change permissions on the drive with 'chmod 555' in this case, so that you can read and execute on the NTFS drive.

On my home network, if I were on my Windows 98 box or WinXP box, I could not even navigate FAT volumes which were hosted by my Linux box through Samba.And no attempt to change permissions had any effect at all.
However, when I changed the umask bits, that changed everything. I could change the permissions as I see fit, AND I was now allowed to navigate these volumes with my Windows boxes, and do anything that the permissions granted. In my case 'chmod 777' . I don't give a shat about security, it's only my home network.

Anyway, you have read my interpretation of what I have read, and my results in my situation.

JC

Last edited by lostboy; 05-12-2003 at 10:53 PM.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read permissions for ntfs drive. Billy|B-A Linux - General 2 02-01-2005 10:20 PM
Change permissions on ntfs drive PieEater Linux - Newbie 2 09-11-2004 09:26 AM
Howto set permissions and automount for new drive? andymadigan Debian 4 08-02-2004 10:17 PM
Howto change WIndows Drive Permissions? amoor757 Linux - Software 9 11-05-2003 12:11 AM
ntfs drive permissions Mack Linux - General 4 01-13-2003 03:58 AM


All times are GMT -5. The time now is 06:04 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
Open Source Consulting | Domain Registration