Hello.
I’ve searched for an answer but didn’t find any working solution.
Here’s my problem:
I’m currently trying to play music from my network drive on DietPi with O!MPD. I’ve managed to add it to /mnt/ directory using PuTTY (the size is - 0 and maybe it’s the main trouble). Now it looks like this:
(pic 1)
But in O!MPD can’t see any of music files on my net drive. All the tracks in /dietpi-userdana/ folder are working perfect…
(pic 2)
MC is showing all my folders and files on this drive with no problem:
(pic 3)
I don’t know how to make it work…
Could someone help me or point in right direction?
DietPi version - 6.21 running on Sparky SBC.
Thanks.
The mpd user requires permissions to that files.
Try:
chown -R mpd:dietpi /mnt/XiaoMi-usb0
chmod -R 775 /mnt/XiaoMi-usb0
Hello.
Thank You for reply.
With USB0 - cannot access.
With usb0 - it takes some time to think but in O!MPD still nothing (no luck even after reboot)… Am I doing something wrong?
Ah yep wrong capitalisation, I edited my post above.
Hmm which file system is XiaoMi-usb0?
Lets check actual permissions:
ls -al /mnt/XiaoMi-usb0/ | head
USB-drive - NTFS
USB-drive is connected to my Xiaomi router. There’s no trouble with mounting in my 2 other Linux systems (Volumio and TinyMPD/Fatboy)
Okay NTFS allows permissions via some running service. Can you check htop if you see the “ntfs” related service running there?
But the permissions still look wrong:
chown -R mpd:dietpi /mnt/XiaoMi-usb0
chmod -R 775 /mnt/XiaoMi-usb0
ls -Al /mnt/XiaoMi-usb0/ | head should then show lines like
drwxrwxr-x mpd dietpi …
Ah the NTFS permissions workaround is not in place. You didn’t mount the drive via dietpi-drive_manager, did you?
Please do:
G_AGI ntfs-3g
And in your /etc/fstab add ,permissions to the mount options of the NTFS drive.
Then redo the chown/chmod commands.
At best also update to the v6.22 Beta that was just released: https://github.com/MichaIng/DietPi/issues/2632
It includes a fix for MPD and permissions, although that is not related to your issue. It (re)allows MPD to access not only to dietpi owned files but also to some audio related kernel/interfaces.
Hm…
I’ve added drive with drive manager. I’ve used this:
G_AGI ntfs-3g - done
/etc/fstab - Permission denied
I can access it with mc but I don’t know what to do in this file. Is it correct file?
I’m just newbie in all this, sorry.
Ah sorry now I got it: It’s a network drive. Sorry didn’t understand correctly at first (lol even that the topic as “net drive”). Okay this is mounted correctly already then with user dietpi and 770 mode.
Okay please verify that MPD runs as group dietpi which allows access permissions:
grep -i ‘group’ /etc/mpd.conf
Or as said update to new Beta to assure that as well.
And then I am not sure if MPD itself has limited access to the music dir assigned in /etc/mpd.conf so O!MPD cannot access to outside of this.
In case you need to adjust /etc/mpd.conf to have:
music_directory "/mnt"
playlist_directory "/mnt"
So all mounts are included. I am not sure if O!MPD GUI does such automatically when adding drives there. At least worth a try to verify this.
Hello again MichaIng
I’ve just updated to 6.22. Allo.com Web GUI isn’t working now… It looks like this after entering Username = admin@allo.com
Password = allo
I can’t open O!MPD interface too. It says “Login failed
netjukebox requires cookies to login.
Enable cookies in your browser and try again.”
And then I am not sure if MPD itself has limited access to the music dir assigned in /etc/mpd.conf so O!MPD cannot access to outside of this.
In case you need to adjust /etc/mpd.conf to have:
music_directory “/mnt”
playlist_directory “/mnt”
I’ve already done it before posting here my question. Not working for me…
I’ve just successfully updated to 6.22.
Everything seems to work fine except my net drive… No luck with it still.
In /etc/mpd.conf
music_directory “/mnt” - done
playlist_directory “/mnt” - done
In O!MPD settings:
$cfg[‘media_dir’] = ‘/mnt/’; - done
Can You suggest anything else?
So the above issue when opening the web UIs is solved? Perhaps was some browser cache issue or something.
Can you please try to edit /etc/fstab and change in the network drive line:
file_mode=0770 to file_mode=0775 and
dir_mode=0770 to dir_mode=0775 as well?
Then remount the network drive:
umount /mnt/XiaoMi-usb0; mount /mnt/XiaoMi-usb0
Perhaps it’s not MPD that lacks permissions/fails to access, but O!MPD with the www-data user
. I though that it does not attempt to access anything directly but only through MPD, but perhaps this is not the case.
I will also run some tests here tomorrow.
file_mode=0770 to file_mode=0775 and
dir_mode=0770 to dir_mode=0775
Yep. That is the case! Now everything is working. And I’m almost happy
I think it should de added in future updates.
Thanks a lot for Your help. I appreciate it.
There’re the few things I want to ask You:
- I can’t find support for *.dff files (only *.dsf). Is it possible to add this format in future builds?
- I’m using Luxman DA-06 as a DAC. It seems to have native DSD playback option but my Linux knowledge is too bad to understand info on GitLab. Now i must switch DOP from “no” to “yes” in etc/mpd.conf to listen DSD. In othe case my DAC is not shoving DSD playback.
I’ve found this:
ALSA: usb-audio: Add native DSD support for Luxman DA-06 (70d79bf9) · Commits · xenomai / ipipe · GitLab
[PATCH 4.9 35/96] ALSA: usb-audio: Add native DSD support for Luxman DA-06 - Greg Kroah-Hartman
Is it realizable on DietPi? I’ll be happy to test native DSD playback if You can help me with all this.
3)On early DietPi builds and Volumio I’ve used M.A.L.P to control MPD from my phone. Settings are still the same as before but it shows me “failed to connect” massage.
M.A.L.P settings:
Hostname or ip: my DietPi ip
port: 6600
These options are incorrect? Is there ani “conf” file where I can check it?
Anyway You’ve done a lot for solving my trouble. Thanks a lot again.
Okay will add the 755 permissions. Global read permissions are default anyway, no idea why we were so strict.
For DFF there exist a decoder plugin: https://www.musicpd.org/doc/html/plugins.html#dsdiff
Please try to add the following to your /etc/mpd.conf
decoder {
plugin "dsdiff"
}
About native DSD support, we do no kernel development, so we depend on the Kernel tree that Allo/Sparky provides which is stuck at 3.10.38: https://github.com/sparkysbc/Linux
Since this patch can be added to the 3.10.38 kernel as well, we could address the request to the Sparky devs.
EDIT: I just opened a pull request to allow native DSD for your device by the Sparky SBC kernel: https://github.com/sparkysbc/Linux/pull/7
About remote MPD access, port 6600 should be fine (default) but we by default block remote control and limit access to MPD clients/frontends on the same machine only. To allow remote access from local network, edit your /etc/mpd.conf and remove (or comment) bind_to_address “localhost”.
Hello,
I’ve tried this
Please try to add the following to your /etc/mpd.conf
decoder {
plugin “dsdiff”
}
but nothing happened. Then I’ve re scaned the mount directory after editing mpd.conf - still nothing. It cant see *.dff even in the mc. Maybe just editing mpd.conf is not enough?
I just opened a pull request to allow native DSD for your device by the Sparky SBC kernel: > Native DSD | Luxman DA-06 by MichaIng · Pull Request #7 · sparkysbc/Linux · GitHub
Thank You very much for this! I hope there’ll be an opportunity to try native DSD on my DAC some day
.