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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-19-2005, 06:22 PM
|
#1
|
LQ Newbie
Registered: Mar 2005
Posts: 6
Rep:
|
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 06:33 PM.
|
|
|
03-19-2005, 06:49 PM
|
#2
|
Member
Registered: Dec 2004
Distribution: gentoo
Posts: 190
Rep:
|
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.
|
|
|
03-19-2005, 07:55 PM
|
#3
|
LQ Newbie
Registered: Mar 2005
Posts: 6
Original Poster
Rep:
|
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?
|
|
|
03-20-2005, 02:51 AM
|
#4
|
Member
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666
Rep:
|
Use the 3rd option visaris told you about.
|
|
|
03-20-2005, 05:10 AM
|
#5
|
LQ Newbie
Registered: Mar 2005
Posts: 6
Original Poster
Rep:
|
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 :/
|
|
|
03-20-2005, 05:14 AM
|
#6
|
Member
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666
Rep:
|
Add the 'umask=NNN' as well after 'noauto,ro,user', setting NNN to whatever it suits you.
|
|
|
03-20-2005, 05:28 AM
|
#7
|
LQ Newbie
Registered: Mar 2005
Posts: 6
Original Poster
Rep:
|
hehe =)
ok thanks, I am a little slow sometimes
|
|
|
04-01-2005, 05:30 PM
|
#8
|
LQ Newbie
Registered: Apr 2005
Posts: 6
Rep:
|
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?
|
|
|
04-01-2005, 07:48 PM
|
#9
|
LQ Newbie
Registered: Mar 2005
Posts: 6
Original Poster
Rep:
|
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 07:50 PM.
|
|
|
04-01-2005, 07:50 PM
|
#10
|
LQ Newbie
Registered: Apr 2005
Posts: 6
Rep:
|
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.
|
|
|
04-01-2005, 08:30 PM
|
#11
|
LQ Newbie
Registered: Apr 2005
Posts: 6
Rep:
|
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??
|
|
|
04-01-2005, 08:32 PM
|
#12
|
LQ Newbie
Registered: Apr 2005
Posts: 6
Rep:
|
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!
|
|
|
04-02-2005, 06:39 AM
|
#13
|
LQ Newbie
Registered: Mar 2005
Posts: 6
Original Poster
Rep:
|
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..!
|
|
|
04-02-2005, 07:07 AM
|
#14
|
Member
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666
Rep:
|
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.
|
|
|
07-25-2005, 04:45 PM
|
#15
|
LQ Newbie
Registered: Jul 2005
Posts: 1
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 06:05 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|