The navidrome package has the default navidrome.service file set to “ProtectHome=yes” which means it won’t read a library in the user’s home directory. This is a known issue with arch as well, so it may just be that I need to raise this with the arch folks. Any feedback greatly appreciated. Thanks.
This is probably intentional, because it is intended as a server application, and therefore, it will look for centrally installed media.
I myself am not using navidrome, but I’ve got all of my music (and video) collection under the /srv hierarchy, and owned root:root with 644 permissions.
It’s a bit more work when adding files to your collection, but in the end, GNU/Linux is a genuine multi-user operating system, and therefore I treat it as one.
That’s a very valid point. Thanks.
That’s odd that Arch enables that setting by default as they normally use upstream defaults as much as possible. It’s commented out in the sample service in Navidrome’s documentation:
# You can uncomment the following line if you don't have any media in /home/*.
# This will prevent navidrome from ever reading/writing anything there.
#ProtectHome=true
I looked at the last state of the old AUR package before it was imported into the Arch repos and it was enabled there as well. It might have been just an oversight.
Make sure you read The bug reporting guidelines first.
Not so long ago this happened with Apache webserver.
It hardened and that cause some confusion among users.
PostgresSQL has a similar setting.
I think it may be a choice by the Arch Linux maintainer, to ensure the given application - so that allowing the application to actually use the user’s home folder - is the user’s choice - not the maintainer or distribution.
Given the nature of service applications; instead of running the application in root context Arch Linux assigns a system user; assigning a system user would then imply that a setting like ProtectHome should be enabled; on one hand it indicates that you cannot share data in your home, on the other hand it is signal that some hardening against unauthorised access to data has been implmented.
Examples of such web applications which can be run locally - only those I have setup on Manjaro
- nextcloud
- forgejo
My personal opinion: Good thinking Arch Linux maintainers.