Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: File/Directory Permissions Problem Addding New Music
#1
I'm not sure if this is a me problem, or a Moode problem, but I couldn't get music to show up in my library until I manually changed permissions of things.

My setup is a Pi4 in an ArgonOne NVME case with a 1TB M.2 drive. The M.2 drive is attached to the Pi as a UAS disk. I installed Moode by connecting the drive's USB port to my PC and writing the image directly to it. The Pi boots off the UAS disk directly, not from an SD card. After it's first boot cycles and setup I shut it down and connected it back to my PC via USB and coped a bunch of music over to it.

That all worked fine, it boots and I can connect to the web interface etc. but I could not for the life of me get Moode to see that I had added any music.

/mnt/SDCARD and everything under /var/lib/mpd/music are owned root:root and it wasn't until I recursively changed the ownership of /mnt/SDCARD to mpd:audio that I could get moode or MPD to see anything I'd added to the library.

I suspect this is an artefact of how I added the music to the system, but I'm not sure how else I'd have done it and it might be something worth mentioning in the documentation.

Thanks.
Reply
#2
Root:root is ok. It's prolly insufficient directory permissions. MPD needs read ® access to files and read+execute (r_x) access to all parent directories. Look in the MPD log (moodeutl --mpdlog) for permission errors.

Example:
Code:
# All parent dirs back to /mnt have drwxr-xr-x 2 root root permissions

# Album dir
pi@trx:~ $ ls -l /mnt/NVME/Music/FLAC/Andre\ Previn\ Trio/
total 4
drwxr-xr-x 2 root root 4096 Jul 25 09:55 'Like Previn!'

$ Music files
pi@trx:~ $ ls -l /mnt/NVME/Music/FLAC/Andre\ Previn\ Trio/Like\ Previn\!/
total 263628
-rw-r--r-- 1 root root 27477453 Jul 25 09:55 '01 Rosie Red.flac'
-rw-r--r-- 1 root root 24699927 Jul 25 09:55 '02 If I Should Find You.flac'
-rw-r--r-- 1 root root 32045742 Jul 25 09:55 '03 Sad Eyes.flac'
-rw-r--r-- 1 root root 46126817 Jul 25 09:55 '04 Saturday.flac'
-rw-r--r-- 1 root root 38543711 Jul 25 09:55 '05 Tricycle.flac'
-rw-r--r-- 1 root root 49036513 Jul 25 09:55 "06 I'm Mina Mood.flac"
-rw-r--r-- 1 root root 17373423 Jul 25 09:55 '07 No Words for Dory.flac'
-rw-r--r-- 1 root root 34635752 Jul 25 09:55 "08 Three's Company.flac"
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
Thanks, I set things back to root:root and directories 0755 and files 0644 and it seems to be able to find things now.
Reply
#4
I think I'll add a systemd oneshot to set those permissions at boot time.
Reply


Forum Jump: