Can't access music located on mounted windows share

Linux related discussion about netjukebox
Locked
dboone
User
Posts: 5
Joined: Mon Aug 19, 2013 8:21 pm

Can't access music located on mounted windows share

Post by dboone »

First off, I'd like to say thanks for a great product. It's exactly what I've been looking for... with one exception ;)

I have a LAMP box (Centos 6.4) running netjukebox v5.38.5.

My music is located on a Windows box (Server 2008).

I've mounted the windows share to the directory "/var/music" by adding the following to my /etc/fstab file:

Code: Select all

//windowsserver/Music   /var/music  cifs    uid=48,gid=48,file_temp=0755,dir_mode=0775,rw,suid,username=windowsuser,password=windowspassword 0 0
MPD is able to read the music fine, running "mpc listall" correctly lists all files in the directory.

However, no matter what I do I can't get netjukebox to read anything from this directory.

I've tried every possible combination of file ownership and permission (setting the mount ownership to apache, mpd, root, etc). I've even the set the entire directory to 777 (recursively).

It appears that the apache user does have the ability to write to this directory. Running "sudo -u apache touch /var/music/test" works and write the file "test" to the directory.

I've enabled debug in the config file, but there are no errors thrown at all (to the screen or apache error log). I also add "error_reporting(E_ALL);" and "ini_set("display_errors", 1);" to the top of the initialize file but this didn't help either.

Any help would be greatly appreciated.

Thanks, Darin
User avatar
wbartels
netjukebox developer
Posts: 881
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Re: Can't access music located on mounted windows share

Post by wbartels »

Sorry, I don't have any experience with CentOS.
Long time ago I had used Fedora, than I had problems to access files from Apache outside the default web directory.
Could it be that it has something to do with SELinux?
http://wiki.centos.org/HowTos/SELinux

Maybe you can first check if netjukebox is working when using the local filesystem.
See what is happening when you temporary disable SELinux:
http://www.centos.org/docs/5/html/5.2/D ... sable.html

Good luck,
Willem
dboone
User
Posts: 5
Joined: Mon Aug 19, 2013 8:21 pm

Re: Can't access music located on mounted windows share

Post by dboone »

Selinux is already completely disabled.

It works just fine when the music is stored on the local filesystem (even when it's outside of the apache doc root). So I know it has something to do with the mounted shared drive.
dboone
User
Posts: 5
Joined: Mon Aug 19, 2013 8:21 pm

Re: Can't access music located on mounted windows share

Post by dboone »

I think I finally figured it out. I had to add "noserverino" to the mount command.

:D
User avatar
wbartels
netjukebox developer
Posts: 881
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Re: Can't access music located on mounted windows share

Post by wbartels »

dboone wrote:I think I finally figured it out. I had to add "noserverino" to the mount command.

:D
Thanks for posting the solution.
Can you post the complete line you used in /etc/fstab?
dboone
User
Posts: 5
Joined: Mon Aug 19, 2013 8:21 pm

Re: Can't access music located on mounted windows share

Post by dboone »

Sure.

Code: Select all

//windowsbox/musicshare	/var/music	cifs	uid=498,gid=48,file_mode=0644,dir_mode=0775,rw,noserverino,username=winuser,password=winpass	0 0
uid = mpd user
gid = apache user
User avatar
wbartels
netjukebox developer
Posts: 881
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Re: Can't access music located on mounted windows share

Post by wbartels »

DualWind wrote:
dboone wrote:Sure.

Code: Select all

//windowsbox/musicshare	/var/music	cifs	uid=498,gid=48,file_mode=0644,dir_mode=0775,rw,noserverino,username=winuser,password=winpass	0 0
uid = mpd user
gid = apache user
Where about do I place this line for it to work? Sorry for the newb question.
You can read it in the first post: /etc/fstab
Because this is an OS specific question you can find more detailed tutorials with Google: https://www.google.nl/search?q=auto+mou ... a+on+linux
Locked