SOLVED CIFS and Symlinks

Status
Not open for further replies.

doctor15

Dabbler
Joined
Apr 26, 2014
Messages
16
I've been troubleshooting this problem for a while but still can't seem to figure it out.

I have a jail running mythtv that uses a script called mythlink to create symlinks to all of my TV shows. I then share the folder with the symlinks (including the folder with the actual files) via Samba for watching on my clients.

I have configured Samba to follow symlinks using the configuration below and can confirm it works for other files
Global Auxiliary Parameters:
unix extensions = no
Media CIFS share auxiliary parameters:
follow symlinks = yes
wide links = yes

If I create a symlink directly on the Freenas box it works fine and is viewable through the Samba share on my Mac OS X machine
ln -s .myth-recordings/1031_20140713000000.mpg test_sym.mpg
ls -l
lrwxr-xr-x 1 root guest 40 Oct 7 22:06 test_sym.mpg@ -> .myth-recordings/1031_20140713000000.mpg

The symlinks created by mythlink, however, are still not viewable vis Samba. (Note that I can see the original files). File information on the symlinks from the Freenas box below
lrwxr-xr-x 1 guest guest 48 Oct 6 22:17 2014-09-22_Pilot.mpg@ -> /mnt/tv/.myth-recordings/1291_20140923000000.mpg
lrwxr-xr-x 1 guest guest 48 Oct 6 22:17 2014-09-29_Selina Kyle.mpg@ -> /mnt/tv/.myth-recordings/1291_20140930000000.mpg

I have tried numerous chmod / chown operations to avoid any permission issues.
If anyone has additional troubleshooting tips, I would greatly appreciate it.
 
D

dlavigne

Guest
It looks like an ownership issue if root:guest works but guest:guest does not.
 

doctor15

Dabbler
Joined
Apr 26, 2014
Messages
16
It looks like an ownership issue if root:guest works but guest:guest does not.
Oh, sorry I should have mentioned that I did try changing the owner of test_sym.mpg to guest, and it was still viewable with no issue. I accidentally included the file information before I did that.

The only difference I see between the ls -l output of the files is that the mythlink symlinks are 48 bytes while the test symlink was 40.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
From what I understand you are running MythTV in a jail on your FreeNAS. Is samba running in the jail or the host environment? If it's in the host, then your symlinks won't point to the right location (they point to a path relative to the jail's root, and not the host's root).
 

doctor15

Dabbler
Joined
Apr 26, 2014
Messages
16
From what I understand you are running MythTV in a jail on your FreeNAS. Is samba running in the jail or the host environment? If it's in the host, then your symlinks won't point to the right location (they point to a path relative to the jail's root, and not the host's root).
Wow, not sure how I missed that detail. You are correct that Samba is running in FreeNas and mythlink is in the jail. I changed the mount point in the jail to mirror the FreeNAS path and everything is working great now.
 
Status
Not open for further replies.
Top