INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: samba and jriver  (Read 4952 times)

audiolover

  • Junior Woodchuck
  • **
  • Posts: 93
samba and jriver
« on: January 05, 2014, 05:49:12 am »

I am struggling to get Samba to work with jriver. I have a directory called "music2" on my nas. I've created a folder called "music2" on my pc, used the chmod command to be able to read/write: sudo chmod -R u+rw

Added a line to fstab: //192.168.1.100/Public/music2     /home/moi/music2  cifs  credentials=/etc/samba/user.cred 0 0

Created the user.cred file with login and password.

If I mount the share everything is OK but jriver keeps asking me to enter a valid location
and does not accept the /home/moi/music2 location?

Does jriver have a problem with samba or is there something I do wrong?
Logged

audiolover

  • Junior Woodchuck
  • **
  • Posts: 93
Re: samba and jriver
« Reply #1 on: January 14, 2014, 10:16:09 am »

nobody who can help me?
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: samba and jriver
« Reply #2 on: January 14, 2014, 12:59:40 pm »

All NAS devices I am familiar with support NFS. I believe you should use NFS if your client is Linux and your NAS supports that too.

Having said that, I can't help you with Samba yet, but I'm going to have to set it up in the coming weeks too. I'm not looking forward to it ;).
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13880
Re: samba and jriver
« Reply #3 on: January 14, 2014, 04:54:21 pm »

Just tried this using your method and it works fine for me.
You should check your permissions.
As the user running MediaCenter from the command line, you should look into the mounted directory.

The following is about unix permissions, there is nothing specific to MC.

The directories with the Music including the top level one (the mount), need to be either owned by the user running MC
or
They need to have the x and r attributes in the last 3 fields.
Here is my samba mount:
ls -ld
drwxr-xr-x 1 root root 0 Jan  9 11:20 .
bob@exp:~/music2$

Files in a subdirectory called FLAC... (the directory itself has the same permissions).
 ls -ltr
total 434336
-rwxr-xr-x 0 root root  15785793 Aug  3  2011 The Beatles - Octopus's Garden (1).flac
-rwxr-xr-x 0 root root  43628357 Aug  3  2011 The Beatles - I Want You (1).flac
-rwxr-xr-x 0 root root  18155076 Aug  3  2011 The Beatles - Here Comes the Sun (1).flac
-rwxr-xr-x 0 root root  14810297 Aug  3  2011 The Beatles - Because.flac
-rwxr-xr-x 0 root root  12227762 Aug  3  2011 The Beatles - Sun King (1).flac
-rwxr-xr-x 0 root root   7472879 Aug  3  2011 The Beatles - Mean Mr. Mustard (1).flac
-rwxr-xr-x 0 root root  21953733 Aug  3  2011 The Beatles - You Never Give Me Your Money (1).flac
-rwxr-xr-x 0 root root  13298271 Aug  3  2011 The Beatles - She Came in Through the Bathroom Window.flac
-rwxr-xr-x 0 root root   7693293 Aug  3  2011 The Beatles - Polythene Pam.flac
-rwxr-xr-x 0 root root   7606452 Aug  3  2011 The Beatles - Golden Slumbers.flac
-rwxr-xr-x 0 root root   9747923 Aug  3  2011 The Beatles - Carry That Weight.flac
-rwxr-xr-x 0 root root  15227431 Nov 14  2011 The Beatles - Something (1).flac
-rwxr-xr-x 0 root root  19240550 Nov 14  2011 The Beatles - Oh! Darling (1).flac
-rwxr-xr-x 0 root root  18770958 Nov 14  2011 The Beatles - Maxwell's Silver Hammer (1).flac
-rwxr-xr-x 0 root root  22770216 Nov 14  2011 The Beatles - Come Together (1).flac
Logged

Mike Noe

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 792
Re: samba and jriver
« Reply #4 on: January 14, 2014, 04:57:39 pm »

fwiw, I'm running FreeNAS on a NAS box and it has CIFS and NFS (we have windows and linux clients and I prefer NFS for the linux clients).  I tested Samba client on this linux machine (with MC19) and it seems to work just fine.  My NAS is running 3.x Samba and this client is 4.x something (openSUSE) but I'm not having any permission issues or other problems.

However, with that said, I would follow InflatableMouse's advice and go with NFS on the NAS and client unless you need CIFS for other windows clients.
Logged
openSUSE TW/Plasma5 x86_64 | Win10Pro/RX560
S.M.S.L USB-DAC => Transcendent GG Pre (kit) => Transcendent mono OTLs (kit)
(heavily modded) Hammer Dynamics Super-12s (kit)
(optionally) VonSchweikert VR8s

audiolover

  • Junior Woodchuck
  • **
  • Posts: 93
Re: samba and jriver
« Reply #5 on: January 17, 2014, 12:26:52 pm »

It still does not work. I tried several options to get the read/write problem solved with NFS but no succes. I think it has something to do with the server but that is something I cannot change right now.

At the same time I would like to get CIFS working as an alternative as I have no read/write issues there.
If I mount the share from the commandline:

sudo mount -t nfs 192.168.1.100:/Public/Tagged /home/moi/muziek

I can point JRiver to that share and it works.

If I put an extra line in FSTAB to automount:

nasc3ae85:/Public/Tagged /home/moi/muziek cifs noexec,credentials=/etc/cifs-nas 0 0

JRiver cannot find the shared folder?? I tried it with IP-address and with server-name but no go?

What am I doing wrong?
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: samba and jriver
« Reply #6 on: January 17, 2014, 01:14:36 pm »

FYI - it used to be that automounting did not occur until first *access* (file or directory traversal).  In otherwords, it is lazy.  This differs from manual mounts.  I  don't know if this is a factor here.
Logged
The opinions I express represent my own folly.

Mike Noe

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 792
Re: samba and jriver
« Reply #7 on: January 17, 2014, 02:36:55 pm »

@audiolover,
Does your distro have SMB4K?

Perhaps give that try for mounting.  Otherwise, sounds like a permissions problem.
Logged
openSUSE TW/Plasma5 x86_64 | Win10Pro/RX560
S.M.S.L USB-DAC => Transcendent GG Pre (kit) => Transcendent mono OTLs (kit)
(heavily modded) Hammer Dynamics Super-12s (kit)
(optionally) VonSchweikert VR8s

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13880
Re: samba and jriver
« Reply #8 on: January 17, 2014, 04:12:02 pm »

It still does not work. I tried several options to get the read/write problem solved with NFS but no succes. I think it has something to do with the server but that is something I cannot change right now.

At the same time I would like to get CIFS working as an alternative as I have no read/write issues there.
If I mount the share from the commandline:

sudo mount -t nfs 192.168.1.100:/Public/Tagged /home/moi/muziek

I can point JRiver to that share and it works.

If I put an extra line in FSTAB to automount:

nasc3ae85:/Public/Tagged /home/moi/muziek cifs noexec,credentials=/etc/cifs-nas 0 0

JRiver cannot find the shared folder?? I tried it with IP-address and with server-name but no go?

What am I doing wrong?
I don't think you want noexec set.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: samba and jriver
« Reply #9 on: January 17, 2014, 04:15:34 pm »

noexec would only prevent executables on the remote file system from being executed. 
Logged
The opinions I express represent my own folly.

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13880
Re: samba and jriver
« Reply #10 on: January 17, 2014, 04:49:38 pm »

noexec would only prevent executables on the remote file system from being executed. 
I dont' use cifs much but I was guessing it might unset the x bit which on a directory with some software appears to make the contents unreadable.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13880
Re: samba and jriver
« Reply #11 on: January 17, 2014, 05:21:38 pm »

Another suggestion, just check the that directory from the command line after mounting it both ways and see what the difference is..
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: samba and jriver
« Reply #12 on: January 17, 2014, 06:52:35 pm »

I dont' use cifs much but I was guessing it might unset the x bit which on a directory with some software appears to make the contents unreadable.

The mount exec flag (MNT_NOEXEC) is checked in the kernel independently of file access permissions.  It is done at the layer below the virtual file systems, so is relevant to all mounted file systems.  It is an additional check perform after access +x permissions are tested.
Logged
The opinions I express represent my own folly.

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13880
Re: samba and jriver
« Reply #13 on: January 17, 2014, 07:36:32 pm »

The mount exec flag (MNT_NOEXEC) is checked in the kernel independently of file access permissions.  It is done at the layer below the virtual file systems, so is relevant to all mounted file systems.  It is an additional check perform after access +x permissions are tested.
Thanks for that.
I can't see anything else obvious unless it's not actually being automounted.
Logged

audiolover

  • Junior Woodchuck
  • **
  • Posts: 93
Re: samba and jriver
« Reply #14 on: January 18, 2014, 02:02:55 am »

So I checked dir permissions in the different scenarios.
I used the directory /home/moi/muziek.

unmounted:                       drwxr-xr-x moi moi
mounted via commandline: drwxrwx--- moi moi  dir is recognised by JRiver and browsable via filemanger
mounted via fstab:             drwxr-xr-x root root  dir is not recognised by JRiver but browsable via filemanager

Why thru fstab the directory gets "root" labels I do not know, the read/write attribute looks fine if I am correct?
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: samba and jriver
« Reply #15 on: January 18, 2014, 04:21:13 am »

Why thru fstab the directory gets "root" labels I do not know, the read/write attribute looks fine if I am correct?

I would think this is the issue. When the mountpoint is root:root your regular user won't be able to access it. You could simply verify that by trying to cd into it from the terminal. Maybe it doesn't like the way you specified the credentials in fstab? Just shooting from the hip.

Another thing I noticed:
sudo mount -t nfs 192.168.1.100:/Public/Tagged /home/moi/muziek

I can point JRiver to that share and it works.

If I put an extra line in FSTAB to automount:

nasc3ae85:/Public/Tagged /home/moi/muziek cifs noexec,credentials=/etc/cifs-nas 0 0

You test nfs from the terminal and placed cifs in fstab.

Try mounting the cifs share from the terminal manually. In fstab you used the same folder for mounting the cifs share as with the nfs share. I'm pretty sure that's not how it works. Example:

I mount my nfs share as server:/mnt/share (as specified in /etc/exports)
I mount the same path as an smb share as //server/smbsharename (as specified in /etc/samba/smb.conf)

In my smb.conf its specified as follows:
Code: [Select]
[smbsharename]
path = /mnt/share
read only = No
hosts allow = 1.2.3.0/24
available = Yes
browsable = Yes

Try mounting the cifs share manually from the terminal first and once that works, see if JRiver gets to it too. Then adjust your fstab accordingly.

From your client, type:
Code: [Select]
smbclient -L servername (or ip)
This should output the sharename you need to mount.

If that still doesn't work I think you're going to have to start troubleshooting on your NAS. I have no clue how a NAS works but if its anything like regular linux you could see if you can enable ssh and login into it. Then check for a file called smb.conf in /etc or /etc/samba and see what's in it. While you're there I would check out the logfiles in /var/log or /var/log/samba (look at file timestamps to see which ones change when you mount a cifs share) and see if it logs anything when your client tries to mount. Compare it to a manual mount attempt. Try 'tail -f' on a logfile so you see any new log entries immediately. Unmount the cifs share and try a 'mount -a' (as sudo or root) with the tail -f open on another terminal to your NAS.

Preparing for my new HTPC next week I just installed samba on my server, configured a user account and created 2 shares. I never worked with samba before but it worked right away. Windows from a VM saw the shares and were able to map them to a drive letter and have read/write access.

From my debian workstation I type:
Code: [Select]
sudo mount -t cifs -o username=myuser,password=mypasswd //1.2.3.4/data /mnt/test
After mounting, the mountpoint looks like this:
Code: [Select]
drwxr-xr-x   9 myuser myuser        0 Jan 17 14:24 test
OS and JRiver can use that share just fine.
Logged

audiolover

  • Junior Woodchuck
  • **
  • Posts: 93
Re: samba and jriver
« Reply #16 on: January 19, 2014, 03:20:45 am »

There are no logfiles on the server with info on mounting so it seems like logging is not enabled. I will try to enable it later.

On the client, this is how the command " mount" shows how my cifs share is mounted:

nasc3ae85:/TaggedNW on /home/moi/muziek type cifs (rw,relatime,sec=ntlm,unc=\\nasc3ae85\TaggedNW,username=moi,uid=500,forceuid,gid=100,forcegid,addr=192.168.1.100,file_mode=0755,dir_mode=0755,nounix,serverino,rsize=61440,wsize=65536,actimeo=1)

When I do ls-ld on the mounted directory:

drwxr-xr-x 1 moi users 0

I made sure that the user " moi" on the server has the same uid/gid as user " moi" on the client, just to be on the safe side.

Is there something wrong in this info? Are there known issues with ldap/idampd that could be the problem here?
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: samba and jriver
« Reply #17 on: January 19, 2014, 03:24:57 am »

Hm I don't know mate. Maybe you would be better off on a straight Linux forum (Linuxquestions) or your NAS manufacturer forums?

Sorry I can't help you out any further.
Logged

audiolover

  • Junior Woodchuck
  • **
  • Posts: 93
Re: samba and jriver
« Reply #18 on: January 19, 2014, 05:05:10 am »

moet ik soms in de hosts file op de client ook iets instellen?
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: samba and jriver
« Reply #19 on: January 19, 2014, 05:49:01 am »

I don't think so, it doesn't look like you have DNS issue.
Logged
Pages: [1]   Go Up