1

This is my problem:

I configured my RPi with Debian:

  • Samba shares a specific folder, that is readable-writeable-executable from my home network: /media/

  • usbmount automount USB devices when inserted in my RPi, in /media/usb

  • No users should be logged in to do this

When I insert an USB device, usbmount mount it correctly, so RPi can write on it and a person can READ it through network. BUT no persons are allowed to WRITE on it through network.

Checking permissions on /media/usb I found that:

  • BEFORE usbmount mount device /media/usb is rwx-rwx-rwx
  • AFTER usbmount mount device /media/usb became rwx-r-r, so only root (usbmount work mounting devices as root) can write on it

So I've tryed to change the FS_MOUNTPOINTS="" line in /etc/usbmount/usbmount.conf file but I don't know how to force usbmount to automount devices rwx-rwx-rwx or with "low-user write permission".

2
  • Check the MOUNTOPTIONS entry in /etc/usbmount/usbmount.conf. Does it contain ro?
    – Bex
    Commented Apr 17, 2015 at 6:17
  • No it doesen't contain ro. All the line: MOUNTOPTIONS="sync,noexec,nodev,noatime,nodiratime"
    – xdola
    Commented Apr 17, 2015 at 22:05

2 Answers 2

3

After a lot of test i edited the FS_MOUNTOPTIONS line:

FS_MOUNTOPTIONS="-fstype=vfat,umask=0000"

Where

  • vfat is the filesystem
  • umask=0000 is the permission of the file and folder. 0000 means rwx-rwx-rwx
0

I've had this problem on linux once. It turned out that mounting a drive will apply the root directory permissions to the mount point. A simple chmod 777 /media/usb after mounting should fix it.

You might also want to add ,dmask=000,fmask=000 (or preferably 002 and using a group) to the FS_MOUNTOPTIONS line.

1
  • The Raspberry should do it automatically, without a person that change the permission. However chmod doesn't work.
    – xdola
    Commented Apr 19, 2015 at 16:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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