Mount options for VFAT in gnome-mount not working and/or defaults not appropriate

Bug #178154 reported by Olivier Mehani
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-mount
Expired
Medium
gnome-mount (Ubuntu)
Won't Fix
Low
Unassigned

Bug Description

The `quiet` option for VFAT file systems allow to silently ignore Unix-permission operations instead of returning an error. This is useful to prevent ''i.e.'' [https://bugs.launchpad.net/ubuntu/+bug/118283 errors when using Unison on heterogeneous file systems].

The `gnome-mount` (0.6-1ubuntu4 in Ubuntu 7.10) backend used by Nautilus to mount removable volumes does not set the `quiet` option by default. Additionally, specifying this option in Nautilus' volume options does not have the expected behavior (or rather: not the one I would be expecting).

Steps to reproduce:
1. Plug a removable drive with a VFAT partition.
/!\ It gets mounted with the `rw,nosuid,nodev,shortname=mixed,uid=1000,utf8,umask=077,usefree` options.

1. Go to ''Places/Computer'', right click on said removable drive;
2. Expand the ''Settings'' part of the ''Volume'' tab;
3. Add `quiet` as ''Mount options'';
4. Demount then remount the device using ''e.g.'', Gnome's popup menus;
{X} The volume is now mounted with the `rw,nosuid,nodev,quiet` instead of the expected `rw,nosuid,nodev,shortname=mixed,uid=1000,utf8,umask=077,usefree,quiet` set.

1. Now specify `rw,nosuid,nodev,shortname=mixed,uid=1000,utf8,umask=077,usefree,quiet` as mount options in the ''Volume'' property tab;
2. Demount then remount the device;
{X} An error message box, appears saying ''Invalid mount option when attempting to mount the volume 'VOLNAME'.''.

Additionally, the same behavior can be triggered using more than one `mount-options` with `gnome-mount`:
`/usr/bin/gnome-mount --hal-udi /org/freedesktop/Hal/devices/volume_uuid_WHAT_EVER --mount-options=rw,nosuid,nodev,shortname=mixed,uid=1000,utf8,umask=077,usefree,quiet` whereas the MAN page for `gnome-mount` states:
           -o, --mount-options
                  Specify mount options. Separate by comma.
NB: it does work with only the `quiet` option.

After fixing this bug, it would be interesting, IMO, to extend the `--mount-option` feature to allow for addition/removal of options from the defaults.
For example, for a device being mounted with default `rw,nosuid,nodev,shortname=mixed,uid=1000,utf8,umask=077,usefree`, specifying `-utf8,+quiet` in the ''Mount options'' entry would result in it being mounted with options `rw,nosuid,nodev,shortname=mixed,uid=1000,umask=077,usefree,quiet` (that is the default set minus `utf8` plus `quiet`). Not putting any plus or minus sign would result in the mount options being completely replaced.

Additionnaly, more in-line documentation (popup label and help file mentioning, at least, the need for comma separation) should be accessible to avoid "normal" user to resort to MAN pages to understand how to fill the ''Mount options'' entry.

Olivier Mehani (shtrom)
description: updated
description: updated
Revision history for this message
Martin Pitt (pitti) wrote :

Thank you for your detailled bug report! I forwarded it to the upstream developers.

Changed in gnome-mount:
importance: Undecided → Low
status: New → Triaged
Changed in gnome-mount:
status: Unknown → New
Revision history for this message
Subharo Bhikkhu (subharo) wrote :

Here are far-better alternative default vfat mount options for gnome (this suggested fix has been copied from this related bug: https://bugs.launchpad.net/bugs/118283)

Basically, instead of the vfat mount option "umask=022", you instead use "dmask=022" and "fmask=133"

Here is a procedure for testing and verify this suggested fix.

1. Within gconf-editor, I used the "Find" tool to search for "vfat" (searching also in all key names and key values). This returned the key "/system/storage/default_options/vfat"

2. I deleted the umask key, then added the 2 keys you suggested as follows:
dmask=022
fmask=133

3. Unmount all vfat drives, remount them again so these new mounting options get used. Now all directories/folders on my vfat USB flash drives and USB external hard drives are presented with the permissions:

drwxr-xr-x

...and all files on my vfat USB flash drives and USB external hard drives are presented with the permissions:

-rw-r--r--

Perfect! These permissions nicely match the default permissions you'd get for all newly-created files and directories under the default umask of 022 (that Ubuntu sets up by default for all users in /etc/profile)

Revision history for this message
Martin Mai (mrkanister-deactivatedaccount-deactivatedaccount) wrote :

Last comment from upstream:
>>>
gnome-mount is dead, so closing this.
<<<
Therefore closing the bug as "won't fix".

Changed in gnome-mount (Ubuntu):
status: Triaged → Won't Fix
Revision history for this message
Subharo Bhikkhu (subharo) wrote :

I've opened bug 592748 to try to get this fixed (in whatever the appropriate package might be).

Changed in gnome-mount:
importance: Unknown → Medium
status: New → Expired
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.