ntfs3g -s option should be ignored, making autofs mounts failing

Bug #1448678 reported by Georg Grabler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
autofs (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I've troubled some with mounting ntfs-3g file systems with autofs.

AutoFS passes the sloppy option (-s) to mounts, which it should not, since ntfs3g does not support it.

handle_packet_missing_indirect: token 7, name Elements, request pid 1882
attempting to mount entry /media/usb/Elements
lookup_mount: lookup(file): looking up Elements
lookup_mount: lookup(file): Elements -> -fstype=ntfs-3g,gid=100,dmask=002,fmask=113,utf8,flush,rw,noatime,user :/dev/Elements
parse_mount: parse(sun): expanded entry: -fstype=ntfs-3g,gid=100,dmask=002,fmask=113,utf8,flush,rw,noatime,user :/dev/Elements
parse_mount: parse(sun): gathered options: fstype=ntfs-3g,gid=100,dmask=002,fmask=113,utf8,flush,rw,noatime,user
parse_mount: parse(sun): dequote(":/dev/Elements") -> :/dev/Elements
parse_mount: parse(sun): core of entry: options=fstype=ntfs-3g,gid=100,dmask=002,fmask=113,utf8,flush,rw,noatime,user, loc=:/dev/Elements
sun_mount: parse(sun): mounting root /media/usb, mountpoint Elements, what /dev/Elements, fstype ntfs-3g, options gid=100,dmask=002,fmask=113,utf8,flush,rw,noatime,user
do_mount: /dev/Elements /media/usb/Elements type ntfs-3g options gid=100,dmask=002,fmask=113,utf8,flush,rw,noatime,user using module generic
mount_mount: mount(generic): calling mkdir_path /media/usb/Elements
mount_mount: mount(generic): calling mount -t ntfs-3g -s -o gid=100,dmask=002,fmask=113,utf8,flush,rw,noatime,user /dev/Elements /media/usb/Elements
spawn_mount: mtab link detected, passing -n to mount
>> ntfs-3g: Unknown option '-s'.
>> ntfs-3g 2014.2.15AR.3 integrated FUSE 28 - Third Generation NTFS Driver
>> Configuration type 7, XATTRS are on, POSIX ACLS are on
>> Copyright (C) 2005-2007 Yura Pakhuchiy
>> Copyright (C) 2006-2009 Szabolcs Szakacsits
>> Copyright (C) 2007-2014 Jean-Pierre Andre
>> Copyright (C) 2009 Erik Larsson
>> Usage: ntfs-3g [-o option[,...]] <device|image_file> <mount_point>
>> Options: ro (read-only mount), windows_names, uid=, gid=,
>> umask=, fmask=, dmask=, streams_interface=.
>> Please see the details in the manual (type: man ntfs-3g).
>> Example: ntfs-3g /dev/sda1 /mnt/windows
>> News, support and information: http://tuxera.com
mount(generic): failed to mount /dev/Elements (type ntfs-3g) on /media/usb/Elements
dev_ioctl_send_fail: token = 7
failed to mount /media/usb/Elements

RedHat fixed it in mount.ntfs3g, see
Reference: RedHat
https://bugzilla.redhat.com/show_bug.cgi?id=1180663

Reference: Fedora Fix
https://admin.fedoraproject.org/updates/FEDORA-2015-0613/ntfs-3g-2014.2.15-7.fc21

Debian seems to want to import the upstream patch of autofs-5.10:
Reference: Debian (against autofs, not mount.ntfs3g)
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773607
which includes the bugfix of autofs-5.10
http://www.spinics.net/lists/autofs/msg01018.html

Is it possible to get a fix for this in Ubuntu as the Fedora-Fix, or the upstream fix from autofs?

I did change the category from mount.ntfs3g to autofs, since there seems to be a debian bug referencing to a autofs fix which I found just after I submitted this - please apologize.

Georg Grabler (ggrabler)
description: updated
description: updated
affects: ntfs-3g (Ubuntu) → autofs (Ubuntu)
Georg Grabler (ggrabler)
description: updated
Revision history for this message
Georg Grabler (ggrabler) wrote :

Workaround (sorry, UGLY), but it "works for now". May give you troubels updating in future :D.

cd /usr/sbin
cp -p ntfs-3g ntfs-3g.0
> ntfs-3g
vi ntfs-3g

#!/bin/sh
# fixes automount -s option that crashes ntfs-3g
line=`echo $@ | sed -e 's/-s//g'`
/usr/sbin/ntfs-3g.0 $line

description: updated
Revision history for this message
Georg Grabler (ggrabler) wrote :

I just re-built the package with the upstream patch, works properly.

Revision history for this message
Georg Grabler (ggrabler) wrote :

Updating the bug, the fix was released a while ago with a new version of autofs.

Changed in autofs (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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