ntfs-3g does not respect fstab options

Bug #162863 reported by Adolfo González Blázquez
86
This bug affects 14 people
Affects Status Importance Assigned to Milestone
ntfs-3g (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: ntfs-3g

Please install ntfs-3g as setuid so the options 'users' and 'user' can be used on /etc/fstab.

From the ntfs-3g man page:

"If ntfs-3g is set setuid-root then non-root users will be also able to mount block devices or via /etc/fstab if the ’user’ or ’users’ mount(8) option is specified. The ntfs-3g process drops the root privilege after successful mount and runs unprivileged afterwards."

Revision history for this message
Jose Bernardo (bernardo-bandos) wrote :

This is now impossible on hardy. Release 1.2216-1ubuntu1 is built against external fuse libraries, and breaks mounting ntfs partitions as user (including external USB drives), as I reported on bug #205081

Martin Pitt (pitti)
Changed in ntfs-3g:
status: New → Confirmed
Revision history for this message
bp (badpazzword) wrote : Re: ntfs-3g does not mount partitions in fstab with 'user'

In Jaunty, as a result of a recent update, mount'ing ntfs partitions with or without the 'user' flag is no longer possible:

badp:~$ mount /dev/sda1
Unprivileged user can not mount NTFS block devices using the external FUSE library. Either mount the volume as root, or rebuild NTFS-3G with integrated
FUSE support and make it setuid root. Please see more information at http://ntfs-3g.org/support.html#unprivileged
badp:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda2
UUID=83fec7c9-2bba-43db-9fa2-7fc4e01baafe / ext3 defaults,errors=remount-ro,relatime 0 1
# /dev/sda1
UUID=2E80878F80875C69 /media/sda1 ntfs defaults,user,nls=utf8,umask=007,gid=46 0 1
# /dev/sda5
UUID=d5e5ddb3-c1da-45b8-b42e-f93c3d101d63 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0

Kees Cook (kees)
summary: - ntfs-3g does not mount partitions in fstab with 'user'
+ ntfs-3g does not respect fstab options
Revision history for this message
Szabolcs Szakacsits (szaka) wrote :
Revision history for this message
Rob Speer (rspeer) wrote :

Based on the text that ntfs-3g spits out, it seems that there is a straightforward fix for this, which is to compile integrated FUSE support into ntfs-3g in Ubuntu.

So, given that this is something that many users want to do, why doesn't the Ubuntu package have integrated FUSE support? Right now it looks like there's no option but to recompile ntfs-3g yourself.

Revision history for this message
Rykel from Singapore (rykel98) wrote :

I do not know if my problem is the same, but the error message I keep getting when trying to mount any NTFS or FAT partition or drive is the same, "Unprivileged user can not mount NTFS block devices using the external FUSE library. Either mount the volume as root, or rebuild NTFS-3G with integrated FUSE support and make it setuid root. Please see more information at http://ntfs-3g.org/support.html#unprivileged "

I do not know what to do and I have tried using PySDM (Storage Device Manager) and while it can mount the drives, the changes are NOT permanent. A reboot will mean that I have to run PySDM again.

Please advise?

Revision history for this message
Rykel from Singapore (rykel98) wrote :

I SOLVED MY OWN PROBLEM!

I had this problem on Lucid as mentioned above and I solved it in 6 steps.

I purged 3rd party drive managers (eg. Storage Device Manager), commented out all the NTFS lines in /etc/fstab, deleted all the mountpoint folders in /media (eg. /media/sdx1), did a "sudo blkid", rebooted, plugged in the devices and Ubuntu auto-detected/auto-setup the UUID of the devices properly - automounted them in Read/Write mode.

The problem seems to be due to the fact that Lucid does NOT use /dev to identify devices anymore, and uses UUID instead.

I suggest that an update be done which will repeat the above steps so that the users will see their NTFS drives automounted again. I hope that helps!

Revision history for this message
MasterZ (arnaud-delcroix) wrote :

I'm also affected by this bug but I cannot find a way to get around it without recompiling the ntfs-3g driver by myself; which is something I would prefer not to do.

I'm trying to mount an NTFS USB drive which contains work documents and I need to share those documents across my home network.
Currently, auto-mount works fine, but the default permissions are '700' which do not allow me to share the drive to other users on my network.

I can mount the drive manually with sudo and by specifying umask=022 (then I can share it via samba) but I would like the drive to be auto-mounted as it is an external device I might need to mount/umount it at anytime easily.
If I try to create an fstab entry with the options: user,umask=022 the automount does not work anymore and I'm getting a 'privilege' error as soon as the device is plugged in.

So it is a bit of a deadlock as if I remove the fstab entry, I do not get the correct permissions; and if I add it back I cannot mount the drive as a user.

I do not want to rebuild the driver on all my PCs and laptops as it would imply that I need the compilation tools everywhere; So could we hope to have an alternate package in the repository that would include the ntfs-3g driver with integrated FUSE support so that each user do not have to rebuild it by himself.

Revision history for this message
Bootch (di-man) wrote :

$ lsb_release -rd
Description: Ubuntu 11.10
Release: 11.10
$ apt-cache policy ntfs-3g
ntfs-3g:
  Установлен: 1:2011.4.12AR.4-2ubuntu3
  Кандидат: 1:2011.4.12AR.4-2ubuntu3
  Таблица версий:
 *** 1:2011.4.12AR.4-2ubuntu3 0
        500 http://ru.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages
        100 /var/lib/dpkg/status

the error persists.

Revision history for this message
Dominic Jänichen (jaenichd) wrote :

This errer indeed got re-introduced (if it was fixed according to #205081). It affects Precise, now.

$ apt-cache policy ntfs-3g
ntfs-3g:
  Installed: 1:2012.1.15AR.1-1ubuntu1
  Candidate: 1:2012.1.15AR.1-1ubuntu1
  Version table:
 *** 1:2012.1.15AR.1-1ubuntu1 0
        500 http://de.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status

$ ntfs-3g --version
ntfs-3g 2012.1.15AR.1 external FUSE 28

As discussed in #205081, ntfs-3g should use *internal* FUSE libraries, instead.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.