devkit-disks: Allowed ntfs-3g mount options

David Zeuthen david at
Fri Jun 12 07:41:05 PDT 2009

On Wed, 2009-06-10 at 13:37 +0200, Martin Pitt wrote:
> Hello devkitters,
> In it was noted that devkit-disks
> does not allow most of the ntfs-3g mount options. So far, ntfs-3g has
> shipped a hal fdi as a workaround (attached) which allows those, but
> obviously that doesn't work with dk-disks any more.
> Is the intention that ./src/devkit-disks-device.c itself gets those
> new options, hardcoded? It already expects ntfs-3g after all:
> | /* this is assuming that ntfs-3g is used */
> | 
> | static const char *ntfs_defaults[] =       {"uid=",
> |                                             "gid=",
> |                                             "dmask=0077",
> |                                             NULL};
> | static const char *ntfs_allow[] =          {"umask=",
> |                                             "dmask=",
> |                                             "fmask=",
> |                                             NULL};
> | 
> If it shouldn't be hardcoded, is there any plan to allow overrides?
> Personally I think that ntfs-3g has been pretty much the only use case
> here, so adding them to devkit-disks-device.c would be okay.

Hmm, I suppose we can add some more options here but note that there's
no UI in GNOME anymore to configure mount options [1] like with what we
had with gnome-mount (gnome-mount is deprecated, for the gdu backend of
GVfs use gvfs-mount instead).

So, yeah, it's not really helping anything adding mount options expect
for 'force' (see below). Anyway, I'm not opposed to adding more options
if they are not security holes so please send patches if you want this.

Incidentally, the only problem (I think) we currently have with ntfs-3g
is that the driver sometimes refuses to mount the file system if it was
cleanly unmounted. The user experience is really bad; googling for it,
it looks like this

We can fix it this way

 a) check for this error (do a strstr() on "$Logfile indicates a clean
    shutdown" for example) when seeing an error when mounting NTFS
 b) use the GMountOperation to put up a dialog asking if the user wants
    to use the 'force' option

 c) remount with the 'force' option


[1] : this is intentional; you shouldn't have to mess around with mount
options, we should do the right thing out of the box. If you have
special needs (like if you are a hacker) you can always just
use /etc/fstab

More information about the devkit-devel mailing list