LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   mounting samba shares with sym links (https://www.linuxquestions.org/questions/linux-general-1/mounting-samba-shares-with-sym-links-382115/)

kb_ganesh 11-11-2005 09:13 AM

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!!

MensaWater 11-11-2005 10:11 AM

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.)


All times are GMT -5. The time now is 11:10 AM.