RPI: No music in NAS after "update MPD database"

I mounted a NAS on my RPI with my musics but I can’t see any musics in WEBGUI
even if I can see them in /var/lib/mpd/music/NAS

The command mount gives:

//192.168.1.1/Media on /mnt/NAS/musique type cifs (rw,relatime,vers=1.0,sec=ntlmv2,cache=strict,domain=WORKGROUP,uid=1000,forceuid,gid=1000,forcegid,addr=192.168.1.1,file_mode=0777,dir_mode=0777,nounix,rsize=61440,wsize=65536,actimeo=1)

The mpd log tells:

[readers.c:1182] error: Cannot open file /var/lib/mpd/music/NAS/musique/Alice Cooper - Poison.mp3: Permission denied
Mar 14 11:35 : mpg123: libmpg123 failed to open /var/lib/mpd/music/NAS/musique/Alice Cooper - Poison.mp3: A generic mpg123 error.

I checked the permission and it seems I have full permission.

pi@volumio:~$ ls -l /var/lib/mpd/music/NAS/musique/
total 26813
-rwxrwxrwx 1 pi pi 4290437 Jun 5 2010 Alice Cooper - Poison.mp3

Any idea ?

mh yes it looks like you own the permission…
I would try:

sudo chmod -R 777 /var/lib/mpd/

But then everybody has all permissions!!! In my own network no problem but think about it.

Tobbes

I tried chmod -R 777 but it changes nothing. I had alreadu full rights.
I don’t know what permission requires mpg123.
Is it due to the link ?

pi@volumio:~$ ls -l /var/lib/mpd/music/
total 4
lrwxrwxrwx 1 root root    9 Jul 13  2013 NAS -> /mnt/NAS/
lrwxrwxrwx 1 root root    9 May 20  2013 ramplay -> /run/shm/
lrwxrwxrwx 1 pi   pi      8 Jul 30  2013 USB -> /mnt/USB
drwxrwxrwx 2 pi   pi   4096 Sep  7  2013 WEBRADIO

I experience simular problems. Most of the time my NAS (PI with Raspbmc) is visable by the Volumio pi’s (2 pcs.)

But sometimes the nas in de webGUI is just gone, while still available via other devices (like laptop etc.)

It happens one Volumio Pi is just working perfect with NAS and the other Volumio Pi is just not showing the NAS.

So, I cannot help you. It looks kindof random :frowning:

The only thing i can say is, good luck! You can do it! Go!
(and please post a solution of any kind in this forum :wink:

Please look at my topic “how to mount a NAS”

how-mount-nas-t821.html

We must find a solution together.

The NAS is mounted because files are seen in /var/lib/mpb/music with rwxrwxrwx.
The only problem is after updating database via webgui or

mpc update

Libmpg123 gives the error permission denied.
If I copy the files locally it works.

Would it be a problem with user or group ?

To continue my investigations, after checking the rights I tried to create a file ‘test.txt’ and it says I don’t have the permissions.

pi@volumio:~$ ls -l /var/lib/mpd/music/NAS/music/
total 7193
-rwxrwxrwx 1 pi pi 7364997 Jun  5  2010 Coldplay - Clocks.mp3
pi@volumio:~$ sudo touch /var/lib/mpd/music/NAS/music/test.txt
touch: cannot touch `/var/lib/mpd/music/NAS/music/test.txt': Permission denied

Can someone understand ?

Hm very strange !

Did you try to change the group:

sudo chgrp audio /var/lib/mpd/music/ 

Tobbes

I get the same permission denied with folder /mnt/NAS

pi@volumio:~$ sudo touch /mnt/NAS/music/test.txt
touch: cannot touch `/mnt/NAS/music/test.txt': Permission denied

pi@volumio:~$ sudo ls -l /mnt/NAS/
total 0
drwxrwxrwx 2 pi pi 0 Mar 16 22:46 music

So it means my NAS is not mounted properly.
In /etc/fstab I have:

//192.168.1.1/media     /mnt/NAS/music  cifs    guest,uid=pi,gid=pi,sec=ntlm,file_mode=0777,dir_mode=0777       0   0

I have the option ‘guest’ because my NAS has no password.
Can it happen that a password is needed for writing ?