LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-16-2017, 01:41 PM   #1
MusicalCoder
LQ Newbie
 
Registered: Jan 2017
Posts: 3

Rep: Reputation: Disabled
Question 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?
 
Old 03-16-2017, 01:59 PM   #2
whynotkeithberg
LQ Newbie
 
Registered: Nov 2013
Location: Murder Dubs... Oakland CA
Distribution: RHEL
Posts: 20

Rep: Reputation: Disabled
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.
 
Old 03-16-2017, 04:01 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 24,381

Rep: Reputation: 5469Reputation: 5469Reputation: 5469Reputation: 5469Reputation: 5469Reputation: 5469Reputation: 5469Reputation: 5469Reputation: 5469Reputation: 5469Reputation: 5469
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.
 
Old 03-16-2017, 07:21 PM   #4
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 3,072

Rep: Reputation: 832Reputation: 832Reputation: 832Reputation: 832Reputation: 832Reputation: 832Reputation: 832
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows deletes symlink files on Samba share pglqmem CentOS 0 02-06-2016 04:45 PM
Preserve symlink on samba share when copying in Windows environment slackware_newbie Linux - Server 3 01-08-2014 11:55 PM
Symlink to share code not working Parcye Programming 2 02-02-2007 02:05 AM
creating symlink on samba drive kminkov Linux - General 2 04-24-2004 10:23 AM
howto: MAke a symlink to a samba share??? trey85stang Mandriva 1 03-14-2004 05:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:49 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