2

I have a question related to usbmountand the root rights. I installed usbmount on my Ubuntu (18.04.2 LTS) and it mounts various USB-Sticks to the right folder (/home/user1/USB) I have specified in the /etc/usbmount/usbmount.conf file.

I can open the folder and view the content in the GUI, but I can't open a media file (e.g. watch an .mp4 with VLC). VLC would open but not show anything.

Checking the folder permissions, it seems like the /home/user1/USB folder permits access from root only. If I want to change the owner of the folder I get an error message.

I also tried the suggestions in usbmount + samba permissions, which don't change anything.

Does anyone have any other suggestion how I could access the files?

Here is my usbmount.conf:

ENABLED=1
MOUNTPOINTS="/home/user1/USB"
FILESYSTEMS="vfat ntfs fuseblk  ext2 ext3 ext4 hfsplus"
MOUNTOPTIONS="sync,noexec,nodev,noatime,nodiratime"
FS_MOUNTOPTIONS="uid=1000,gid=1000,dmask=0077,fmask=0177"
VERBOSE=no

NTFS-formatted sticks also don't get mounted, but I think it's better to focus on the other problem first.

1

Can't test this myself as I do not use usbmount, but I am guessing the variable

FS_MOUNTOPTIONS="uid=1000,gid=1000,dmask=0077,fmask=0177"

needs to be modified.

According to the documentation:

# Filesystem type specific mount options: This variable contains a space
# separated list of strings, each which the form "-fstype=TYPE,OPTIONS".
#
# If a filesystem with a type listed here is mounted, the corresponding
# options are appended to those specificed in the MOUNTOPTIONS variable.
#
# 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.
FS_MOUNTOPTIONS=""

The documentation is perhaps a little bit ambiguous, but it seems to suggest that you should use the following (as an example for the vfat filesystem):

FS_MOUNTOPTIONS="-fstype=vfat,uid=1000,gid=1000,dmask=0077,fmask=0177"

If needed, add more strings of the type "-fstype=xyz, options" to that line for each additional filesystem.

1
  • Thanks for your suggestion, I did that, but unfortunately I get the exact same result. I tried a reboot, but still the same. ls -l gives me: drwxr-xr-x 3 root root In Files, I see the mount-folder with a lock, but I can copy data from it but just not play content from it... Any other suggestion? – CVXDEV Oct 1 '19 at 18:57
0

After further research I made it work, for reference:

Hope this helps. This currently only works for FAT formatted USBs. NTFS-formatted sticks I wasn't able to automount (yet) even though I added the FS_MOUNTOPTIONS commands.

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.