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.