You are not logged in.

#1 2008-04-02 23:42:45

otti
Member
Registered: 2006-12-18
Posts: 64

[partially solved] mount problem using ntfs-3g

Hi,

I updated ntfs-3g (to version 1.2310-1) and now I can't mount a ntfs-partition anymore.

I did the following trying to get it to work:

chown root /bin/ntfs-3g
chgrp storage /bin/ntfs-3g
chmod 4750 /bin/ntfs-3g

The permissions are:

drwxrwxr-x  2 root storage 4.0K 2007-07-05 00:54 windowsD
brw-rw---- 1 root disk 8, 2 2008-04-03 00:46 /dev/sda2

/etc/fstab:

/dev/cdrom /mnt/cdrom   auto   ro,user,noauto,unhide   0      0
/dev/sda6 swap swap defaults 0 0
/dev/sda8 / ext3 defaults 0 1
/dev/sda7 /home reiserfs defaults 0 0
/dev/sda5 /mnt/media reiserfs defaults 0 0

/dev/sda1 /mnt/windowsC auto user,noauto 0 0
/dev/sda2 /mnt/windowsD ntfs-3g users,noauto,uid=1000,gid=100,fmask=0113,dmask=0002,locale=en_US.utf8 0 0
#/dev/sda2 /mnt/windowsD ntfs-3g defaults,users,noauto,uid=1000,umask=0 0 0

/dev/usbdisk /mnt/usbdisk ntfs-3g defaults,users,noauto,uid=1000,umask=0 0 0
/dev/usbstick /mnt/usbstick auto rw,user,noauto,umask=0000 0 0
/dev/mp3player /mnt/mp3player auto rw,user,noauto,umask=0000 0 0

groups for the user:

disk audio optical storage users otti

And when I try to mount the ntfs-partition, I get the following message:

mount /mnt/windowsD
Error opening '/dev/sda2': Permission denied
Failed to mount '/dev/sda2': Permission denied
Please check '/dev/sda2' and the ntfs-3g binary permissions,
and the mounting user ID. More explanation is provided at
http://ntfs-3g.org/support.html#unprivileged

Did I miss something? Why isn't it working???
Thanks for any help.

Last edited by otti (2008-04-04 11:56:14)

Offline

#2 2008-04-03 15:16:17

carlocci
Member
From: Padova - Italy
Registered: 2008-02-12
Posts: 368

Offline

#3 2008-04-03 23:40:54

otti
Member
Registered: 2006-12-18
Posts: 64

Re: [partially solved] mount problem using ntfs-3g

This is all quite confusing neutral.

I changed my /etc/fstab, which now looks like that:

...
/dev/sda1 /mnt/windowsC auto user,auto 0 0
/dev/sda2 /mnt/windowsD ntfs-3g users,auto,locale=en_US.utf8 0 0
...

So, windowsD is mounted at boot-up and I have read/write access also as a normal user.

But it seems that the mount option are ignored, because when I look at /etc/mtab and /proc/mount there are other mount options listed:

/dev/sda2 /mnt/windowsD fuseblk rw,noexec,nosuid,nodev,noatime,allow_other,blksize=4096 0 0

and

/dev/sda2 /mnt/windowsD fuseblk rw,nosuid,nodev,noexec,noatime,user_id=0,group_id=0,allow_other 0 0

Is it possible to specify mount options somewhere, where they will be considered for mounting?

Last edited by otti (2008-04-04 11:52:19)

Offline

#4 2008-04-04 12:50:31

carlocci
Member
From: Padova - Italy
Registered: 2008-02-12
Posts: 368

Re: [partially solved] mount problem using ntfs-3g

http://ntfs-3g.org/support.html#useroption2
It's a known problem.
Because of a problem of mount, you must have access rights to the partition you want to mount and the directory you want to mount on. That's because mount fails to invoke the ntfs3g binary with the right permissions, even if the "users" option is set in fstab.
Before ntfs-3g 1.2216, mount as user worked since it just ignored all the permissions invoking everything as root (which is bad).

If you really want to mount as user with mount you have to check the permissions to the dir and the partition (that's for mount) and you have to set your primary group to the group with the rights to access the dir and the partition (that's for the excessive restriction in the ntfs-3g driver, which will be fixed) (omg what did I say???)

carlocci ~  $  ls -ld /media/Volume/
drwxrwxr-x 2 root storage 4096  5 feb 16:28 /media/Volume/
carlocci ~  $  ls -l /dev/sde* /dev/fuse
crw-rw-rw- 1 root root 10, 229  3 mar 16:33 /dev/fuse
brw-rw---- 1 root disk  8,  64  3 mar 11:03 /dev/sde
brw-rw---- 1 root disk  8,  65  3 mar 11:03 /dev/sde1
carlocci ~  $  groups
disk wheel locate games dbus hal network video audio optical floppy storage power users

If I want to mount as user, I need to follow one of these options
a) set my primary group to disk and make Volume directory writable to everybody
b) set my primary group to disk and change Volume group to disk
c) make both the partition and the directory writable by everyone
d) set my primary group to storage and make the partition writable to everybody
e) set my primary group to storage and change the partition group to storage

Even if I'm in the right groups, the ntfs-3g driver just "checks" what the primary groups is.


tl;dr
just mount through HAL

Offline

#5 2008-04-04 20:43:24

otti
Member
Registered: 2006-12-18
Posts: 64

Re: [partially solved] mount problem using ntfs-3g

Thanks for the clarification.

Somehow I figured out how to mount as a user, but it has only worked once.
I used "sg disk mount /mnt/windowsD/", so I didn't have to change my primary group.
Strange thing is: after unmounting the partition, it was not possible to mount it again with the same command (sg...).

Now I use hal to mount the partitions (forgot to mention it in my second post roll)

Offline

Board footer

Powered by FluxBB