Is Symlink an option?

Discussion in 'Linux Beginners' started by neumann, Jan 10, 2023.

  1. neumann

    neumann Member

    Hi all

    My day to day computers are windows. Only my servers are linux (ubuntu) and a few tasks are running on Raspberry pi also on the provided linux there.

    On my old (perfect) server I had also the server running as a file "repository". Well all my files for word, excel, video recordings, music and so on was stored there in my home folder. This is in order for me to have access to those files no matter where I am.
    Early on I just had an samba server running as a fileshare, but learned along the way (by reading, not by experience) that this is a bad way of sharing files over the internet, since samba is insecure or at least not secure enough.

    Then I found out that it is possibel by installing 2 programs on the windows machines which made it possible to access the relevant files via sshfs. It has worked like a charm.

    I used this recipe to move the home directory to an external harddrive: https://www.howtogeek.com/442101/how-to-move-your-linux-home-directory-to-another-hard-drive/.

    But I was wondering: Is it possible to do it by a symlink instead? Can I make a "pointer" that when I try to access a folder on one drive it automaticly point me to another folder (preferably by same name), that actually holds the files?
     
    Last edited: Jan 10, 2023
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You can try creating a symlink and test if it works.
    It depends on how file systems are mounted and which options used.
     
  3. neumann

    neumann Member

    Ok Thank you.
    I'll do some experimenting. I have never used symlinks, so I'm on thin ice. Have to look it up. :)
     
  4. pyte

    pyte Well-Known Member HowtoForge Supporter

    Sure you can do this but it's silly in the case you described above. Mounting the drive directly there is a way better solution to the problem. Symlinks can cause quiet a hassle sometimes, and personally i wouldn't overuse them especially when there's a better soltuion for the problem given.
     
    ahrasis likes this.
  5. neumann

    neumann Member

    I have chosen to mount a 6TB drive and has mounted the filesystem for the home directory. And it works like a charm.

    Thank for the inputs. :)
     
    pyte likes this.

Share This Page