LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-19-2005, 05:22 PM   #1
Gentleman_finn
LQ Newbie
 
Registered: Mar 2005
Posts: 6

Rep: Reputation: 0
Mounting ntfs partition


hello.

I am pretty new to linux, so pleace explain in details, thanks

Here's what I have done until now:

I have tryed the mepis distro for some time, just to try linux out, then i decitet that i wantet to try ubuntu, I installed it and here I am now
Now I want to mount a ntfs partition where I have my music on, it's hda 5

Enhed Opstart Start Slut Blokke Id System
/dev/hda1 1 922 7405933+ 7 HPFS/NTFS
/dev/hda2 992 6756 46307362+ f w95 udvidet (LBA)
/dev/hda3 * 6757 7297 4345582+ 83 Linux
/dev/hda5 992 6728 46082421 7 HPFS/NTFS
/dev/hda6 6729 6756 224878+ 82 Linux swap / Solaris

so i type "mount ntfs /dev/hda5 /media/hda5

and it works fine the partition gets mountet

Here's my problem:

1. I want to open the partition in Amarok, the music player, so I can play my music, but it seams that I can't :/ it just have a lock symbol on the folder, how can i change it, so amarok also have read acces to hda5??

2. I tryed writing "/dev/hda5 /media/hda5 ntfs default 0 0" in fstab so that it would auto mount on startup, how do I get it to auto mount??

Last edited by Gentleman_finn; 03-19-2005 at 05:33 PM.
 
Old 03-19-2005, 05:49 PM   #2
visaris
Member
 
Registered: Dec 2004
Distribution: gentoo
Posts: 190

Rep: Reputation: 30
I take it that you are mounting the NTFS partition while you are logged in (su possibly) as root, and that you are trying to access the files from a non-root account?

If what I just said is the case, this might help. Because NTFS does not contain any linux file ownership information, linux sets the owner of all files on a NTFS volume to the user who mounted the volume. This is why your normal user account cannot access the files; root mounted the drive.

From the mount manpage:
Code:
Mount options for ntfs
       ...
       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.
You have a few options:

1) You can specify a umask value when you mount the NTFS volume:
Code:
prompt # mount -t NTFS -o umask=644 /dev/hda5 /media/hda5
The 644 value should make it so that while the files are still owned by root, other users are allowed to read them.

2) You could use the uid= and guid= options:
Code:
prompt # mount -t NTFS -o uid=1000,gid=100 /dev/hda5 /media/hda5
This will cause the files to be owned by the specifid user and group instead of root. (uid = user id, gid = group id) If you want to find out what uid and gid values to use, you can try "echo $UID" (and $GID), but if all else fails look in your /etc/passwd and /etc/groups files.

3) Edit /etc/fstab so that the volume can be mounted by users:
Code:
/dev/hda5      /media/hda5            ntfs         noauto,ro,user          0 0
This tells the computer to not mount the volume on boot. That way a user has the ability to mount it later on. Because the user, and not root, mounts the volume, the owner of the files should be set to the user.


I prefer method 1 personally. It is more secure. Also remember that NTFS in linux is read-only currently. Don't expect to be able to write to the NTFS volume.
 
Old 03-19-2005, 06:55 PM   #3
Gentleman_finn
LQ Newbie
 
Registered: Mar 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by visaris

1) You can specify a umask value when you mount the NTFS volume:
Code:
prompt # mount -t NTFS -o umask=644 /dev/hda5 /media/hda5
The 644 value should make it so that while the files are still owned by root, other users are allowed to read them.
thanks thats wotking just fine, but i still don't want to write this every time i start linux..! how can i fix that?
 
Old 03-20-2005, 01:51 AM   #4
harken
Member
 
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666

Rep: Reputation: 30
Use the 3rd option visaris told you about.
 
Old 03-20-2005, 04:10 AM   #5
Gentleman_finn
LQ Newbie
 
Registered: Mar 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by harken
Use the 3rd option visaris told you about.
I tryed the 3rd uption..! but it mounts it under root..! so I dont have any acces to it :/
 
Old 03-20-2005, 04:14 AM   #6
harken
Member
 
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666

Rep: Reputation: 30
Add the 'umask=NNN' as well after 'noauto,ro,user', setting NNN to whatever it suits you.
 
Old 03-20-2005, 04:28 AM   #7
Gentleman_finn
LQ Newbie
 
Registered: Mar 2005
Posts: 6

Original Poster
Rep: Reputation: 0
hehe =)

ok thanks, I am a little slow sometimes

 
Old 04-01-2005, 04:30 PM   #8
waldropij
LQ Newbie
 
Registered: Apr 2005
Posts: 6

Rep: Reputation: 0
I am having a similar problem -- I have gone over and over the fstab settings and have tried a myriad of combinations, all with no success.

Automatic mounting of a SATA drive (showing as SDA1) does not occur with the following:

/dev/sda1 /mnt/media ntfs ro,umask=000 0 0

Is there anything I can do to allieviate this problem -- I can live with it, but I'd rather not, you know?
 
Old 04-01-2005, 06:48 PM   #9
Gentleman_finn
LQ Newbie
 
Registered: Mar 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Try:

Code:
/dev/sda1         /mnt/media         ntfs       ro,umask=555,auto         0             0
Remember to use umask 555 so that you cant write to the nfts partition..! as someone wrote before

Last edited by Gentleman_finn; 04-01-2005 at 06:50 PM.
 
Old 04-01-2005, 06:50 PM   #10
waldropij
LQ Newbie
 
Registered: Apr 2005
Posts: 6

Rep: Reputation: 0
I've tried the auto mount option -- but it still dosn't do the trick. I havn't tried that in conjunciton with the umask=677 option, so I will try that. I'll post my results after my next reboot. Thanks.
 
Old 04-01-2005, 07:30 PM   #11
waldropij
LQ Newbie
 
Registered: Apr 2005
Posts: 6

Rep: Reputation: 0
nope...the umask=677 option locked all other users out of the device and the auto option still does not load the device. This is getting to be a pain in the ass, cause every time I boot I have to manually mount the partition IOT get my media libraries to rescan (since they were missing upon boot). Root dosn't mount this device, for some reason! wft??
 
Old 04-01-2005, 07:32 PM   #12
waldropij
LQ Newbie
 
Registered: Apr 2005
Posts: 6

Rep: Reputation: 0
after going back, I don't know where the hell I got 677 from for the umask -- but 555, 644...heheh...666...still don't work!
 
Old 04-02-2005, 05:39 AM   #13
Gentleman_finn
LQ Newbie
 
Registered: Mar 2005
Posts: 6

Original Poster
Rep: Reputation: 0
I don't know if anyone but me is still looking at this tread..! And I am pretty new to linux..! so

Try and mae a new tread so that all the hardcore helpers can see your problem..!
 
Old 04-02-2005, 06:07 AM   #14
harken
Member
 
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666

Rep: Reputation: 30
First of all, it isn't advisable to start a new thread just because the existing one doesn't get answered. And actually, it's not about being answered to, but being patient. Some threads get a reply after 5-10 mins after creation, others after days. It depends on how many users are currently browsing the boards, their level of knowledge, their mood etc.

As for the umask setting, IIRC the values passed to it are actually "substracted" from a 777 permission set. So, try instead a 'umask=022' option.
 
Old 07-25-2005, 03:45 PM   #15
Sergenten
LQ Newbie
 
Registered: Jul 2005
Posts: 1

Rep: Reputation: 0
Quote:
Originally posted by harken
As for the umask setting, IIRC the values passed to it are actually "substracted" from a 777 permission set. So, try instead a 'umask=022' option. [/B]
hi, thx for this great info.
It worked for me after using this:
mount -t ntfs -o umask=022 /dev/hda5 /media/hda5

I'm also a in the linux world. So this problem has been annoying me for some time, but its finally solved thx too you guys

 
  


Reply

Tags
mount, ntfs


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
ntfs partition mounting as rw ktekosi Slackware 4 06-07-2005 08:43 PM
mounting an NTFS partition greythorne Slackware 1 06-02-2004 01:02 AM
Mounting XP NTFS partition Belize Red Hat 14 10-13-2003 01:33 PM
mounting ntfs partition ! shaahul Linux - Newbie 11 09-16-2003 05:06 AM
Mounting NTFS partition dark_light Linux - General 4 09-20-2002 11:39 PM


All times are GMT -5. The time now is 12:29 PM.

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