• Sshfs: follow remote machine links, not local ones

    From Ottavio Caruso@21:1/5 to All on Tue Nov 22 10:12:47 2022
    Hi,

    I have an almost identical Debian installation on two Thinkpads. One is
    my mobile workhorse (trem), the other my almost dead laptop that I use
    at home as quasi-desktop (tloc).


    On tlocal, I do:

    $ sshfs -C 192.168.1.100: ~/trem

    and it correctly mounts my remote home dir at ~/trem

    On both machines, I have two symlinks:

    Documents -> /home/oc/storage/Documents/
    Downloads -> /home/oc/storage/Downloads/

    (I must keep these simlinks for compatibility with 1000s of documents
    and scripts)

    So, when I try to access ~/trem/Downloads or
    ~/trem/Documents

    all I see is the contents of the local machine symlinks, because of
    symlink loops.

    Is there anything I can do about it without changing the filesystem layout?



    --
    Ottavio Caruso

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dale Dellutri@21:1/5 to Ottavio Caruso on Tue Nov 22 18:04:58 2022
    On Tue, 22 Nov 2022 05:12:47, Ottavio Caruso <ottavio2006-usenet2012@yahoo.com> wrote:
    Hi,

    I have an almost identical Debian installation on two Thinkpads. One is
    my mobile workhorse (trem), the other my almost dead laptop that I use
    at home as quasi-desktop (tloc).


    On tlocal, I do:

    $ sshfs -C 192.168.1.100: ~/trem

    and it correctly mounts my remote home dir at ~/trem

    On both machines, I have two symlinks:

    Documents -> /home/oc/storage/Documents/
    Downloads -> /home/oc/storage/Downloads/

    (I must keep these simlinks for compatibility with 1000s of documents
    and scripts)

    So, when I try to access ~/trem/Downloads or
    ~/trem/Documents

    all I see is the contents of the local machine symlinks, because of
    symlink loops.

    Is there anything I can do about it without changing the filesystem layout?

    I'll assume that these are soft links, and the links are in /home/oc/

    If that's true, perhaps change the symlink to, for example:
    Documents -> ./storage/Documents

    Would that work?

    (If the symlinks are in /home/oc/storage, you don't need a symlink.)


    --
    Dale Dellutri <daQQQle@panQQQix.com> (lose the Q's)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From William Unruh@21:1/5 to Ottavio Caruso on Tue Nov 22 17:41:37 2022
    On 2022-11-22, Ottavio Caruso <ottavio2006-usenet2012@yahoo.com> wrote:
    Hi,

    I have an almost identical Debian installation on two Thinkpads. One is
    my mobile workhorse (trem), the other my almost dead laptop that I use
    at home as quasi-desktop (tloc).


    On tlocal, I do:

    $ sshfs -C 192.168.1.100: ~/trem

    Why don't you use nfs rather than sshfs?

    and it correctly mounts my remote home dir at ~/trem

    On both machines, I have two symlinks:

    Documents -> /home/oc/storage/Documents/
    Downloads -> /home/oc/storage/Downloads/

    In what directory are those symlinks? Are /home/oc/storage/Do* symlinks?

    (I must keep these simlinks for compatibility with 1000s of documents
    and scripts)

    So, when I try to access ~/trem/Downloads or
    ~/trem/Documents

    access how?
    ls ~trem/Downloads ?



    all I see is the contents of the local machine symlinks, because of
    symlink loops.

    No idea what that means? What "local machine symlinks"? What symlink
    loops?

    You do know that none of use have access to your system nor are any of
    us mindreaders, so you have to describe things in words, not assumptions.

    Is there anything I can do about it without changing the filesystem layout?




    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ottavio Caruso@21:1/5 to All on Wed Nov 23 11:57:50 2022
    Op 22/11/2022 om 18:04 schreef Dale Dellutri:
    On Tue, 22 Nov 2022 05:12:47, Ottavio Caruso <ottavio2006-usenet2012@yahoo.com> wrote:
    Hi,

    I have an almost identical Debian installation on two Thinkpads. One is
    my mobile workhorse (trem), the other my almost dead laptop that I use
    at home as quasi-desktop (tloc).


    On tlocal, I do:

    $ sshfs -C 192.168.1.100: ~/trem

    and it correctly mounts my remote home dir at ~/trem

    On both machines, I have two symlinks:

    Documents -> /home/oc/storage/Documents/
    Downloads -> /home/oc/storage/Downloads/

    (I must keep these simlinks for compatibility with 1000s of documents
    and scripts)

    So, when I try to access ~/trem/Downloads or
    ~/trem/Documents

    all I see is the contents of the local machine symlinks, because of
    symlink loops.

    Is there anything I can do about it without changing the filesystem layout?

    I'll assume that these are soft links, and the links are in /home/oc/

    If that's true, perhaps change the symlink to, for example:
    Documents -> ./storage/Documents

    Would that work?

    (If the symlinks are in /home/oc/storage, you don't need a symlink.)



    I solved that conundrum by adding:

    "-o follow_symlinks"

    $ sshfs -C -o follow_symlinks 192.168.1.100: ~/trem

    Now the localhost thinks that ~/trem/oc/Downloads is a real directory
    and not a symlink.



    --
    Ottavio Caruso

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)