S
S
Satisfied IT2019-07-11 11:09:07
linux
Satisfied IT, 2019-07-11 11:09:07

Why doesn't usbmount properly mount flash drives with ntfs?

Ubent 18.04.1 is available without graphics, it is necessary to automount the connected flash drives, Google advised to do this using usbmount, installed, fat32 was mounted, but with a clumsy display of Russian names, found and corrected, but ntfs mounts not correctly at all, mount in the console gives out that everything is mounted, but when trying to view the contents or go to the mounted folder, we get an error - Конечная точка передачи не подсоединена. If mounted manually with the command

sudo mount -t ntfs -o nls=utf8,umask=0222 /dev/sdb1 /media/usb0
then everything works fine. How to win?
mount output
/dev/sdb1 on /media/usb0 type fuseblk (rw,nodev,noexec,relatime,sync,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)

usbmount config
ENABLED=1
MOUNTPOINTS="/media/usb0 /media/usb1 /media/usb2 /media/usb3
             /media/usb4 /media/usb5 /media/usb6 /media/usb7"
FILESYSTEMS="vfat ntfs"
FS_MOUNTOPTIONS="-fstype=vfat,gid=users,uid=nobody,umask=000,sync,codepage=866,iocharset=utf8
\ -fstype=fuseblk,rw,nls=utf8,umask=0222,allow_other,nonempty,relatime,default_permissions
\ -fstype=ntfs,rw,nls=utf8,umask=0222,allow_other,nonempty,relatime,default_permissions
\ -fstype=ntfs-3g,rw,nls=utf8,umask=0222,allow_other,nonempty,relatime,default_permissions"

VERBOSE=yes

Write to syslog on automount
usbmount[1990]: /dev/sdb1 contains filesystem type ntfs
usbmount[1990]: mountpoint /media/usb0 is available for /dev/sdb1
usbmount[1990]: executing command: mount -tntfs -osync,noexec,nodev,noatime,nodiratime,rw,nls=utf8,umask=0222,allow_other,nonempty,relatime,default_permissions /dev/sdb1 /media/usb0
ntfs-3g[2043]: Version 2017.3.23 integrated FUSE 28
ntfs-3g[2043]: Mounted /dev/sdb1 (Read-Write, label "WINSETUP", NTFS 3.1)
ntfs-3g[2043]: Cmdline options: rw,sync,noexec,nodev,noatime,nodiratime,relatime,nls=utf8,umask=0222,allow_other,nonempty,default_permissions
ntfs-3g[2043]: Mount options: rw,sync,noexec,nodev,nodiratime,nls=utf8,allow_other,nonempty,allow_other,nonempty,default_permissions,relatime,default_permissions,fsname=/dev/sdb1,blkdev,blksize=4096
ntfs-3g[2043]: Global ownership and permissions enforced, configuration type 7
usbmount[1990]: executing command: run-parts /etc/usbmount/mount.d
usbmount[1990]: usbmount execution finished

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Satisfied IT, 2019-07-12
specialist @borisdenis

The issue was solved with the help of systemd + udev
https://serverfault.com/questions/766506/automount...
usbmount did not want to work normally with any parameters, if it mounted it for 15 seconds

P
polar_yogi, 2019-07-11
@polar_yogi

man mount, -t ntfs does not support the allow_other,nonempty,default_permissions options,
so mount -t ntfs fails. When mounting by hand, you specify only nls=utf8,umask=0222 and there are no problems.
And -t ntfs-3g crashes with an error, try
mount -t ntfs-3g with options from the config and the situation should repeat itself.
I don’t know why ntfs-3g crashes, maybe it’s a combination of options or an error, try to remove everything unnecessary from the config.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question