• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Linux: How to access mounted partions without being root?

Sureshot324

Diamond Member
I have all my mp3's on my second hard drive on a ntfs partition. However, when I mount a partition, I can't seem to access it without being root. I would like to be able to add my mp3 folder to my xmms playlist, but this only works if i run xmms as root. Any way around this?
 
Are you sure your changes are being erased?

There are 2 files that seem similar, /etc/mtab and /etc/fstab. /etc/fstab is the one you edit, and /etc/mtab is automaticly generated....

What OS are you using?
 
Hmmm, the line i added to /etc/fstab is there again, so maybe i just imagined that it was gone...strange. I'm running Fedora Core 2, and i upgraded the kernel to 2.6.7.

Anyway, now when i type 'mount' with no parameters, the following line is in my list of mounted drives:

/dev/hdb1 on /mnt/hdb1 type ntfs (rw,noexec,nosuid,nodev)

and, as root, i can access it without having to manually mount it, so i guess it is automatically mounting at boot. However, if i try to access it while not root i get:

[louis@localhost louis]$ cd /mnt/hdb1
bash: cd: /mnt/hdb1: Permission denied

Here is my /etc/fstab:


LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/hda5 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/hdb1 /mnt/hdb1 ntfs user 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0

Note: hdb is a dynamic disk
 
Your very close.

The only problem is that I see is that you put a space in their between ntfs and user.

Should be a comma, the space makes the computer think it's part of the next feild, which doesn't make sense so it's ignored.
 
ntfs is the file system and user is an option. I'm pretty sure they are supposed to be different fields.

Another thing is i compiled the kernel without write support for ntfs file systems. This seems to be preventing me from using chmod to change the permissions of the /mnt/hdb1 directory.

[root@localhost mnt]# chmod 004 hdb1
chmod: changing permissions of `hdb1': Read-only file system
 
make sure you include user in the options in fstab

That only allows users to mount/umount the device, it doesn't do anything to the rights if it's mounted on bootup.

What you need is the umask option, that tells the VFS what rights to emulate since Linux doesn't support NTFS rights natively. umask=0000 should work, but since you're using NTFS you won't be able to write to the filesystem even though the rights will look like you can.
 
Originally posted by: Nothinman
make sure you include user in the options in fstab

That only allows users to mount/umount the device, it doesn't do anything to the rights if it's mounted on bootup.

What you need is the umask option, that tells the VFS what rights to emulate since Linux doesn't support NTFS rights natively. umask=0000 should work, but since you're using NTFS you won't be able to write to the filesystem even though the rights will look like you can.


Finally! Adding the umask=0000 option did it. Thanks for the help everyone.
 
Originally posted by: Sureshot324
ntfs is the file system and user is an option. I'm pretty sure they are supposed to be different fields.

Another thing is i compiled the kernel without write support for ntfs file systems. This seems to be preventing me from using chmod to change the permissions of the /mnt/hdb1 directory.

[root@localhost mnt]# chmod 004 hdb1
chmod: changing permissions of `hdb1': Read-only file system


duh. Your right. The squished formating thru me off. Sorry
 
Back
Top