Ubuntu

ntfs-3g support for pmount

Reported by Florent Mertens on 2006-10-01
8
Affects Status Importance Assigned to Milestone
pmount (Ubuntu)
Wishlist
Unassigned

Bug Description

Hi,

Since now ntfs-3g is in the repo, it's could be nice if pmount could support it. I wrote a little patch to add this support :

diff -Nur pmount-0.9.13/src/fs.c pmount-0.9.13.new/src/fs.c
--- pmount-0.9.13/src/fs.c 2006-08-07 01:21:17.000000000 +0200
+++ pmount-0.9.13.new/src/fs.c 2006-09-12 19:55:42.000000000 +0200
@@ -23,6 +23,7 @@
     { "iso9660", "nosuid,nodev,user", 1, NULL, 1 },
     { "vfat", "nosuid,nodev,user,quiet,shortname=mixed", 1, "077", 1 },
     { "ntfs", "nosuid,nodev,user", 1, "077", 1 },
+ { "ntfs-3g", "nosuid,nodev,user,nonempty", 1, "077", 1 },
     { "hfsplus", "nosuid,nodev,user", 1, NULL, 0 },
     { "hfs", "nosuid,nodev,user", 1, NULL, 0 },
     { "ext3", "nodev,noauto,nosuid,user", 0, NULL, 0 },
diff -Nur pmount-0.9.13/src/pmount.c pmount-0.9.13.new/src/pmount.c
--- pmount-0.9.13/src/pmount.c 2006-08-15 22:47:45.000000000 +0200
+++ pmount-0.9.13.new/src/pmount.c 2006-09-12 19:57:00.000000000 +0200
@@ -286,6 +286,11 @@
             return -1;
         }
         snprintf( iocharset_opt, sizeof( iocharset_opt ), ",iocharset=%s", iocharset );
+ /* for ntfs-3g we will use the locale= option */
+ if (strcmp (fsname, "ntfs-3g") == 0) {
+ debug( "filesystem is ntfs-3g. Setting locale to %s\n", setlocale( LC_ALL, "" ));
+ snprintf( iocharset_opt, sizeof( iocharset_opt ), ",locale=%s", setlocale( LC_ALL, "" ));
+ }
     }

Basically, it consist just of adding ntfs-3g to fs.c & add a little thing to handle the special locale= option of ntfs-3g which replace the iocharset stuff.

The main issue is that i have to add an nonempty option otherwise it fails to mount, and i don't know actually what's the cause. Since pmount itself check also if the directory is empty or not, that's not really an issue, but it's quite silly.

This patch don't replace the ntfs driver which is still default, but it allow to mount easily an ntfs USB disk in the user space with read/write support quite easily, with a simple command :
pmount -t ntfs-3g /dev/sda1.
And it's also could be use with a nautilus script which remount the drive with the -t ntfs-3g option (i'm trying to make such script)

Consider this bug as a wish.

Thanks

Martin Pitt (pitti) on 2006-10-06
Changed in pmount:
importance: Undecided → Wishlist
status: Unconfirmed → Confirmed
mlx (myxal-mxl) wrote :

Excuse the rant, but what gives? As of 2007-05-19, this bug has been here for more than 6 months, Feisty has been released with ntfs-3g right in its repositories and we're still stuck on being unable to automount removable ntfs volumes with it. A possible solution is right in the bug report. Since ntfs-3g is supposed to be supported, I'm increasing the importance.

Looking forward to a fix. Thanks.

Florent Mertens (givre) wrote :

There is no need for this support in feisty since it doesn't use anymore
pmount, but gnome-mount, that has been patch to enable this support
so it should works out of the box.

mlx (myxal-mxl) wrote :

Gnome-mount might have the patch applied, but:
1.) that's not a good excuse to leave pmount unpatched, especialy if the fix involves a line or two of code
2.) it doesn't fix the thing in Kubuntu, for obvious reasons - which might be another piece of evidence that Kubuntu feisty wasn't thoroughly tested with ntfs-3g - the first one being the Kmenu shortcut for ntfs-config which tried to run "gksu ntf...." instead of "kdesu ntfs..."

Martin Pitt (pitti) wrote :

1) pmount is essentially unmaintained and will be removed in Debian and demoted in Ubuntu soon (preferably removed, too). It's obsolete since nobody uses it any more.
2) Kubuntu stopped using pmount since Edgy already.

miraks (s-mankowski) wrote :

I am on Kubuntu 7.04 and I have a problem to mount automatically a NTFS external disk, because of pmount seems to be used.
I think this bug is valid until pmount is used.

Vincent Fourmond (fourmond) wrote :

Hello, I've taken over maintenance of pmount (in debian) -- I assure it won't be removed. I'll give a look into the patch.

Vincent Fourmond (fourmond) wrote :

Fixed in 0.9.16. You need to specify explicitly the -t ntfs-3g option.

Changed in pmount:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers