LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-11-2005, 09:13 AM   #1
kb_ganesh
Member
 
Registered: Jun 2005
Posts: 42

Rep: Reputation: 15
mounting samba shares with sym links


the situation facing me is this....there are 2 computers, one on debian and one on ubuntu...the former is sharing some directories through samba...and i am accessing it(rather trying to) on my ubuntu..now on the debian computer, the person sharing it is actually sharing a folder that he has created that has symlinks to all the folders that have the content but are in different directories inside / ...the problem now is that when i mount the shares on my computer using smbmount, it mounts fine but then the sym links still show up as links...but as sym links to folders on my computer...and obviously, those folders to which the sym links exist dont exist on my computer..as a result, the whole effort is going waste...why isnt samba symlinking the shares to the folders on the remote computers when mounting? or is there any other solution to this "problem" ? (have already told him about nfs but my friend doesnt want to nfs his shares for some reason)...


thanks for any help!!
 
Old 11-11-2005, 10:11 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Wouldn't matter if he were doing NFS - you'd have the same problem. (Of course its retarded to do Samba for Linux to Linux since its designed for Windows and NFS is a lot easier but oh well.)

Anyway the issue is that the symlinks are local by definition. They say go from "here" to "there". "here" is local on the mount once you've mounted it locally from the remote but the "there" is also local so you'd have to ALSO mount the filesystems to which the symlinks are pointing.

Example:

Remote system filesystem: /home

Local mount of /home as /home2.

Within /home there is a directory (/home/jlightner) but it has a file called test which is a symbolic link to /tmp/test.

On the remote host actions /home/jlightner/test would write into file /tmp/test (/tmp by the way may be a filesystem or just a subdirecttory).

On the local machine it is still a link to /tmp but it is a DIFFERENT /tmp - the one that already exists on the local machine. So if you add contents to /home/jlightner/test on the remote then try to cat it on the local it won't find it because it was never created in this /tmp. Howeve if on the local you add contents to /home/jlightner/test it would not find it on the remote because it had not added to the remote's /tmp direct but to the local.

The only way around this would be to share out /tmp from the remote and mount it as /tmp on the local. (Don't do this for /tmp by the way - just using /tmp as an example.)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sym links and hard links akudewan Linux - Newbie 4 02-09-2005 05:08 AM
sym links -- RealPlayer lmellen Linux - Newbie 2 08-29-2004 02:29 PM
Dead sym links Hangdog42 Linux - General 5 10-02-2003 04:35 AM
Sym Links and vsFTPd Datacraft Linux - Software 1 05-24-2003 05:20 PM
dead sym links dewcansam Linux - General 1 02-08-2002 04:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration