I was trying to attach specific USB drive to home folder of the user. I have installed vsftpd, but Kodi can't move on upper hierarchy. So he can't access /media folder, but FileZilla can.My USB is automounted by system when I connect it,as /media/DRIVE, always with same name.I'm trying to create symlink ln -s /media/DRIVE /home/user/DRIVE  this works for navigation, when i trying to access file this always not working, I don't know why. User has access to this folder and file, he is sudouser.So I found the much better solution mount --bind /media/DRIVE /home/user/DRIVE  and thats works as I wanted. All fine, but after device ejected and plugged in again the system create new folder /media/DRIVE_ so this bind is not working.I also try to bind specific device by UUID, but no result.What I doing wrong? I googled more, and found advice to create custom systemd service for that, is this correct way, and where I can read documentation for mounting services.I'm using Debian with systemd.
Bind USB drive to home directory on demand
mount;bind mount
You could try the debian usbmount package. The script /usr/share/usbmount/usbmountis triggered by udev when a USB storage device is connected, according to the rules in /lib/udev/rules.d/usbmount.rules. It looks for e.g. the UUID of the device, and mounts according to entries in the /etc/fstab (which, of course, should have option noauto). Or modify /etc/usbmount/usbmount.conf for the path of (dynamic) mount points (if no entry in etc/fstab). This is also supported.If this does not match your needs, you may modify the usbmountscript, e.g. to name the dynamic mount points after the UUID of the device.