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 installed usbmount package on ubuntu server lucid 10.04. It worked fine. I just plug in my USB flash. The server detects it and automatically mounts it under /media/usb0.

I want this USB folder to be available as samba share. I want it to be available to everyone with full control. The problem is that the usbmount mounts it using default permissions with root as owner.

Any idea how I can configure the usbmount to do this?

share|improve this question
up vote 2 down vote accepted

You set ownership and permissions in /etc/usbmount/usbmount.conf

The file is well commented, you are looking for the section

# For example, "-fstype=vfat,gid=floppy,dmask=0007,fmask=0117" would add
# the options "gid=floppy,dmask=0007,fmask=0117" when a vfat filesystem
# is mounted.

Enter in your options in the "FS_MOUNTOPTIONS=" line.

Example, to allow user and group, but deny otheres:


See man mount for options or identify the file system (NTFS / FAT) if you need assistance.

share|improve this answer

Your USB flash drive is probably formatted using FAT, which can not store Linux permissions or owner information. Because of this, the Linux kernel pretends root owns all files.

If you want to allow custom permissions, you might want to either reformat the flash drive using a file system other than FAT (ext3?). Alternatively, you should be able to override the default owner in usbmount/fstab.

share|improve this answer
I want to be able to access the USB flash from Windows machine. I am using samba for this. Otherwise, I don't need samba at all! Sorry, but your suggestion is not valid. I am concerned about configuring usbmount or setting the permission of the mounted USB drive. – Khaled Dec 11 '11 at 8:32
My point is that the fact that the permissions don't work has nothing to do with Samba. – jelmer Dec 11 '11 at 15:00

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.