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?

2 Answers 2


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.


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.

  • 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, 2011 at 8:32
  • My point is that the fact that the permissions don't work has nothing to do with Samba.
    – jelmer
    Dec 11, 2011 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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