Set better umasks for FAT filesystems (USB drives etc)

Bug #60722 reported by Rimas Kudelis on 2006-09-16
Affects Status Importance Assigned to Milestone
pmount (Ubuntu)

Bug Description

Binary package hint: hal

Currently, FAT partitions on USB disks etc. are mounted with umask=077, thus making every file on them look like an executable.

It would make more sense to mount those filesystems with dmask=077,fmask=177 options, so that directories can be browsed, but files aren't executable. I don't think that would hurt anyone.

Rimas Kudelis (rq) on 2006-09-16
description: updated
Martin Pitt (pitti) on 2006-10-06
Changed in hal:
assignee: nobody → pitti
status: Unconfirmed → Confirmed
Phillip Calvin (phillipc) wrote :

The executable bit being set also causes Nautilus to ask the user what to do (Open or Execute) when a user double-clicks a file on a FAT USB disk. This can be confusing for users unfamiliar with executable permissions who simply expect the file to open in its associated program.

pherris (pherris) wrote :

I had the same problem and here's what fixed it for me:

fstab options before: "quiet,utf8,umask=006,uid=1000,gid=1000"
would result in "u=rwx,g=x,o=x".

fstab options now: "quiet,utf8,umask=177,dmask=077,uid=1000,gid=1000"
results in "u=rw,g=,o=" for files and "u=rwx,g=,o=" for directories.

Rimas Kudelis (rq) wrote :

use fmask, not umask.

Martin Pitt (pitti) on 2008-03-19
Changed in pmount:
assignee: pitti → nobody
ceg (ceg) wrote :

You can make your fat filesystem permissions look like matching to your default umask.

Mount options:
for umask 002: dmask=002,fmask=113
 for umask 022: dmask=022,fmask=133
(do not use the unspecific umask option)

As a workaround adjust your personal hal vfat mount options in the gconf-editor, but the defaults need to be dealt with by ubuntu.

Other usefull mount options can be found on:

Przemek K. (azrael) wrote :

Bug 78505 has a more established discussion. Also see bug 14335.

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

Other bug subscribers

Remote bug watches

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