Posts: 2
Joined: Sun Jan 20, 2019 10:09 pm

Accessing a usb drive as a different user

Mon May 17, 2021 9:16 pm


I'm running airsonic as using Systemd as a user called airsonic using the instructions here. My music is on an usb hard drive which I can see has automatically mounted as /media/pi/elements. I can view the files when logged on as pi. If I manually run airsonic (so running as the user pi) like this

Code: Select all

java -jar airsonic.war
it can see the files and works fine, however if it's started using Systemd as the airsonic user then it can't see the files. I could just run it as pi but that doesn't seem like the best idea. I've not been able to work out what to do next.

I presume that the problem is one or both of the following:

1. The airsonic drive will be in a different location for the airsonic user since I presume the pi in /media/pi/elements is the username?
2. The airsonic user doesn't have permission to access the usb drive.



Return to “Media centres”