Jump to content

How to create a symlink to folder stored on unRAID?


RockDawg

Recommended Posts

I just wanted to chime in - maybe this helps you, maybe not.  I have a perm mount on my ubuntu/debian server from which I download files/torrents to a mounted unraid share.  took me a while to get it set, but its been working great for quite some time now.  maybe you can apply some of the commands from below to get you to where you want to be....

 

so this is basically how I created a permanent mount on my ubuntu box:

 

1. Edit your nsswitch.conf.  Look for the line that says "hosts: files dns...  and add wins to the line right before dns.  so it will look like this:

    hosts:  files wins dns mdns 4, etc.

 

2 install winbind with apt-get winbind and then reboot.

 

3 presuming you want this to be a permanent mount, create a password file that details your unraid username/pw:

  sudo nano /root/.smbcredentials

 

  contents of the file should be:

    username=redrum

    password=murder

  (no spaces)

 

  lock the permissions of the file:

  sudo chmod 700 /root/.smbcredentials

 

4.  now edit your fstab for the permanent mount

  sudo nano /etc/fstab

 

  add the following entry at the bottom

    //TOWER(netbiosname or ip address)/share //ubuntubox/sharename cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

 

    NOTE:  as you can see, this will mount the unraid share as R/W.  if you dont want that, just change it to guest...or i guess you could just add a user in unraid and refer to that username. 

 

  so my line looks like this (i created a user share just for this, and have put firewall restrictions on my pfsense router to tighten security)

 

    //tower/newmedia/ //gb/downloads  cifs credentials=/root/.config/.smbcredentials,iocharset=utf8,noserverino,gid=1000,uid=1000,nounix,file_mode=0777,dir_mode=0777 0 0

 

  NOTE: I had to add the noserverino as well as my uid and gid....i was told that was hit or miss....just find out what your userid is in ubuntu and add it accordingly. 

 

5.  after saving your fstab file, just enter :

 

  sudo mount -a

 

  if you dont get an error, it worked.  go ahead and check the share, or put a test file on it, and it should be good to go. 

 

6.  then edit your /etc/rc.local to mount the smbfs/cifs when you log in (make sure the permissions on your /etc/rc.local will allow users to execute it:

 

mount /ubuntubox/sharename

exit 0

 

 

hope that helps.

Link to comment

I thought this was working, but it turns out it's not.  I just figured out that initially XBMC wouldn't write/save the thumbs to the mounted Thumbnail directory.  I wasn't sure why the newly scanned movies didn't show a thumb so I rebooted.  Everything then seemed to work fine.  It turns out that's because the mount/link is broken after a reboot and XBMC then just writes/saves the thumbs locally in the Thumbnail folder like it normally would.  Nothing is written to the server's Thumbnails folder.  So still no joy.

 

OK, a little twist to this.  It turns that this actually was working.  What I found is that after I create the mount, I can copy a file via FTP to the Thumbnails folder on the XBMC box and it indeed would show up in the Thumbnails folder I created on unRaid.  The same also worked vice versa.  The problem seemed to be that when XBMC would try to write to the folder, it couldn't.  After thinking about it for a while, I wondered if it was a permissions issue.  Indeed it seems to be.  When I was initially testing via FTP, I was logging in as root.  That's why it worked, but when I logged in as my typical XBMC user ('kevin'),  I could no longer manually copy a file to the Thumbnails folder in XBMC.  My FTP client returned this error;

 

/home/kevin/.xbmc/userdata/Thumbnails/951328.pdf: open for write: permission denied

 

I assume this is the same problem the XBMC system is facing when it tries to write to that folder.  I can write to the mount if I'm logged in to XBMC as root, but if I'm logged in as 'kevin'.

 

So now my question is what do I need to do to allow user "kevin" to write to the mounted folder?  I have no user level security enabled in unRaid.  Just the default root user which I assigned a password.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...