View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 6 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: SAMBA trouble shooting
PostPosted: Sun Sep 30, 2012 8:27 am 
Offline
Joined: Wed May 09, 2007 8:47 pm
Posts: 367
Location: Minnesota- Brrrrr!
I am trying to access a directory from my WIN7 machine. Win7's explorer file manager returns an error message "X:\video\Target is not accessible. Access is denied". Oddly, I can access the directory from WinSCP and from a Putty CLI. I mapped my X: to the Samba share:

net use X: \\mythtv\myth

I am able to navigate the directories as expected except one. in /myth. This directory is actually a symbolic link:

[root@mythtv ~]# ls -l /myth/video | grep Target
lrwxrwxrwx 1 myName myName 14 Aug 27 23:11 Target -> /mnt/data/Target

to a USB HDD:

[root@mythtv ~]# ls -l /mnt
drwxrwxrwx 1 root root 4096 Apr 20 06:27 data


I am not sure where to begin troubleshooting. I poked around the permissions and changed the owner of the symbolic link:

[root@mythtv ~]# ls -l /myth/video/ | grep Target
lrwxrwxrwx 1 mythtv mythtv 14 Aug 27 23:11 Target -> /mnt/data/Target

Any actionable suggestions would be appreciated. Examples would be ideal. Thank you.

_________________
R7.3: 0.22.20091023-1, Hauppauge PVR-500 (Philips FQ1236A MK4), Gigabyte Gigabyte EG45M-UD2H, E5200 2.4Ghz, 2GB RAM, NVIDIA GEFORCE 256MB


Top
 Profile  
 
PostPosted: Sun Sep 30, 2012 8:57 am 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1995
Location: /dev/null
Does samba honor symlinks? Perhaps there is a special configuration you need to invoke (I do not know). How about simply adding a new share pointing to your USB drive without a symlink in /etc/smb/samba.conf?

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
PostPosted: Sun Sep 30, 2012 10:06 am 
Offline
Site Admin
Joined: Fri Jun 11, 2004 7:58 am
Posts: 507
Quote:
Does samba honor symlinks? Perhaps there is a special configuration you need to invoke (I do not know).

Yes it will follow symlinks, but the option needs to be enabled in the config file. By default it will not follow them.
These are the 3 things that will enable symlinks safely:

unix extensions = no
follow symlinks = yes
wide links = yes

I will leave it to you to look up where they go and what they do :)


Top
 Profile  
 
PostPosted: Sun Sep 30, 2012 10:15 am 
Offline
Joined: Mon Dec 24, 2007 9:47 am
Posts: 535
Location: Ottawa, Canada
Normally this happens because by default Linux Samba does not allow you to follow links to parts of the target machine that you can't otherwise see. To enable it you usually have to edit smb.conf and put something like this into it:
Code:
follow symlinks = yes
wide links = yes


I don't see smb.conf on my system but I do see "/usr/MythVantage/templates/samba/smb.conf.template". Not sure where this template is loaded into but chances are the actual conf file likely does an include of this template so you could try adding the code into this template and see if it works.


Top
 Profile  
 
PostPosted: Sun Sep 30, 2012 10:20 am 
Offline
Site Admin
Joined: Fri Jun 11, 2004 7:58 am
Posts: 507
in this case the template is actually copied and turned into smb.conf

At this point in time there is no user editable SMB config file. I mean you can edit the files that are currently there, but there is always the chance it will be overwritten the next time systemconfig.py is run.

Please don't let that info stop anybody from changing config files, just something to be aware of.


Top
 Profile  
 
PostPosted: Sun Sep 30, 2012 8:40 pm 
Offline
Joined: Wed May 09, 2007 8:47 pm
Posts: 367
Location: Minnesota- Brrrrr!
I followed thes steps:

1) Add these lines to /etc/samba/smb.conf

# Symlinks to be honored per viewtopic.php?f=5&t=22808&p=135530#p135530
unix extensions = no
follow symlinks = yes
wide links = yes

2) restart smbd
[root@mythtv ~]# sv restart smbd
ok: run: smbd: (pid 4627) 0s

Received the same Win7 error. Did I miss something along the way?

_________________
R7.3: 0.22.20091023-1, Hauppauge PVR-500 (Philips FQ1236A MK4), Gigabyte Gigabyte EG45M-UD2H, E5200 2.4Ghz, 2GB RAM, NVIDIA GEFORCE 256MB


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu