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?
You set ownership and permissions in
/etc/usbmount/usbmount.conf
The file is well commented, you are looking for the section
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.