LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I symlink for a Samba Share (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-symlink-for-a-samba-share-4175601934/)

MusicalCoder 03-16-2017 01:41 PM

How do I symlink for a Samba Share
 
I have a OpenMediaVault computer, and have created a Samba share on it. My main computer is Ubuntu-Mate, and I am able to go under Networking (in Caja) and see the share, and give the credentials and connect.

Once I have that connection, is there any way for me to create a symlink to that connection in my home folder?

whynotkeithberg 03-16-2017 01:59 PM

It should be the same as any other symlink... It has to be a soft link as a hard link can't reach across filesystems.

ln -s /path/to/share /home/yourdir

If you wish for the contents of that share to be in the root of your homedir you'll need to either rm or mv your homedir then

ln -s /path/to/share/ /home/youruser

That will then create your userdir as a link to that share. Just be aware if that share goes down doing it the second way you will lose everything in your homedir until the share is back online.

So the first option would give you a directory in your homedir that links to the share. The second method would make your homedir be that share but you could experience issues as a result.

michaelk 03-16-2017 04:01 PM

Welcome to LinuxQuestions

I'm not sure where a gvfs filesystem is mounted anymore but look at:
/run/usr/(user_name)/gvfs

You might have to install gvfs-fuse. Be sure to logout and login.
sudo apt-get install gvfs-fuse

However, since the mount point is dynamic you would have to create the link every time you mount the share in caja. A better solution might be to actually mount (via mount command) the share instead of using the file browser. You need to install the samba client and samba utilities.

Keith Hedger 03-16-2017 07:21 PM

not a good idea to put your home dir on a samba share anyway as smb does not support symlinks and you will find a number of them in your home folder.


All times are GMT -5. The time now is 09:18 AM.