# ntfs-3g woes

## mordredP

i cannot bring myself to let users mount the ntfs partition on /dev/sda7!

everything smooth for root but not for users: this is the error i get:

```

mordred@excalibur ~ $ mount /mnt/storage/

Error opening partition device: Permission denied

Failed to startup volume: Permission denied

Couldn't mount device '/dev/sda7': Permission denied

Mount failed.
```

this is my fstab line:

```
/dev/sda7               /mnt/storage    ntfs-3g         user,noauto,noatime         0 0
```

i also tried to sed uid, gid, rw, users, umask=0000 but with no success..

----------

## romildo

I am experiencing the same problem.

----------

## GoingDown

Yes, same problem here. 

As a workaround, I just mount it on system startup with uid= and gid= parameters:

```

dev/hda1 /mnt/win ntfs-3g  uid=xxxxxxx,gid=users,show_sys_files,noatime     0 0

```

You need to autoload fuse module for this to work.

----------

## bekkra

Hm, the working option for mount(8) is

```
options
```

NOTE the pluralis. Any user will be able to mount a file system when this flag is given. That other flag in the presented fstab lines does not do the work. When you state that you have tried "options", how did fstab look, what command was issued and what was the resulting output ? Did you see anything in the kernel logs ?

//

----------

## lindegur

I had the same problem but now I'm getting close. I did:

 echo "sys-fs/ntfs3g ~x86" >> /etc/portage/package.keywords   

emerge ntfs3g it emerges also the kernel driver fuse. Fuse exist also in the source deliverd by the kernel, don't enable this when you make menuconfig.

/etc/fuse.conf is missing after the emerge, therefore it takes default values and regular users can not mount the ntfs partition. 

echo "user_allow_other" >> /etc/fuse.conf enables this.  

modeprobe fuse to load the driver and for the next boot echo "fuse" >> /etc/modules.autoload.d/kernel-2.6

Now you can manually mount the partition as regular user (verify that you have write acces to the mounting point /mnt/sda1).

ntfs-3g /dev/sda1 /mnt/sda1

To unmount it type

fusermount -u /mnt/sda1

In fstab I have:

/dev/sda1 /mnt/sda1 ntfs-3g noauto,user,rw 0 0

it mounts with the kde icon, but with errors and I can not unmount. Probably it is too much for kde to mount with ntfs-3g and unmount with fusermount Any Idea how to make it? It points me to:

https://forums.gentoo.org/viewtopic-t-480767-highlight-ntfs3g.html?sid=e0d8c7b9d575c74ee6239e9e1a025d9d

----------

## mordredP

creating that config file for fuse did not work..

----------

## lindegur

What access right has your mounting point /mnt/storage ?

ls -l /mnt

drwxrwxrwx  2 root root .....storage 

  :Rolling Eyes: 

----------

## Gentree

 *Quote:*   

> Probably it is too much for kde to mount with ntfs-3g and unmount with fusermount Any Idea how to make it?

 

last time I looked at kde it was too much for it to umount removable media   :Rolling Eyes: 

mind you if you spend a bit of time understanding hal config files you should be able to give it a umount command line I think.

dont do kde but I came across all this looking at making usb keys mount without the hopeless vfat sync "feature".

 :Cool: 

----------

## jazty

Has anyone tried adding the user to the 'disk' group? that and adding user_allow_other to fuse.conf did the trick for me...

----------

## Gergan Penkov

adding somebody to the disk group, is not you will do on a multiuser system, it is roughly the same as to give somebody the root account.

----------

## Vicchius

I had the same problem today and found this old post... well since I solved my problem I post here the solution for other people which could need it in the future...

emerge ntfs3g with use flag "suid": any non-root user will be able to mount ntfs partitions but:

 *Quote:*   

> 
> 
>  *
> 
>  * You have chosen to install ntfs3g with the binary setuid root. This
> ...

 

----------

## Gentree

depends how multiuser you need to be . If the user is you went not being root popping a terminal and going su is safest. If you really have other unsafe users to consider making it automount may be better. 

There again, if you cant trust the user, do you want him to have rw access to the ntfs where he could royally screw up the system files which will now be within his playground.

 :Cool: 

----------

## irgu

The vulnerability must be during a very narrow time window because ntfs-3g unrecoverably drops the privilege after successful mount. The user space driver always runs with the user's privilege who mounted the partition. This gives much stronger security compared to in-kernel filesytems because a security compromise is not system-wide typically. See e.g. http://projects.info-pull.com/mokb/

----------

