Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Ubuntu 10.10 and using a usb drive but I'm finding that I can't chmod any programs on the drive to +x. It is being auto-mounted by Gnome (using udev, I think?) so I imagine the problem is a mount option but I can't seem to find a way to modify the default mount options any where. There are no entries in fstab. Anybody encounter this problem?

share|improve this question
If it's vfat/ntfs, you can set the default permissions with the dmask/fmask mount options mount -o umask=xxx depending on what rights you want, umask=0 will give all rights.. – karthick87 Dec 15 '10 at 10:21
Yes, but I can't seem to find out how to modify these options for when Gnome automounts an inserted device. I have it mounted manually to another location from an entry in /etc/fstab, so this will work for the time being, it's a bit inconvenient though. – asterisk Dec 15 '10 at 10:49
up vote 11 down vote accepted

I guess your usb drive is formatted with VFAT/FAT32. This file format does not support execute permissions which is why chmod +x fails.

[Edit] Ok, had a bit of a play and search on the net. Lots of 'solutions' suggest that you should change /etc/fstab. This just seems clunky to me, what do you do? change fstab every time you encounter a new usb flash drive???

My solution:

$ sudo vi /etc/udev/rules.d/90-usb-disks.rules

Add the lines:

# UDEV Rules to change the permission of USB disks

KERNEL=="sd*[0-9]", ATTR{removable}=="1", ENV{ID_BUS}=="usb", MODE="0022"

$ sudo /etc/init.d/udev restart

Then try inserting a usb drive. There is probably an attribute that you can check for to ensure it's a FAT formatted drive if you wanted to be more specific.

share|improve this answer
It seems not, I added an entry to /etc/fstab with the options I require and I'll just have to mount it manually every time I insert it until I can figure out how to modify the default mount options. – asterisk Dec 15 '10 at 10:46
Ah,this is exactly what I was looking for but couldn't find the right file. Worked like a charm, thank you! – asterisk Dec 19 '10 at 17:05
Hi, I'm trying your solution but it is not working for me. Can you take a look at my question? Thanks in advance – pacomet May 18 '12 at 12:38
How can I make it only for vfat systems? – user334639 Feb 10 '15 at 20:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.