bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#54130: 29.0.50; TRAMP SSHFS can't visit remote files using absolute


From: Michael Albinus
Subject: bug#54130: 29.0.50; TRAMP SSHFS can't visit remote files using absolute symlinks
Date: Thu, 24 Feb 2022 16:19:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Version: 28.2

Philipp Stephani <p.stephani2@gmail.com> writes:

Hi Philipp,

> On a remote host REMOTE, create an arbitrary file and an absolute
> symlink to it:
>
> REMOTE$ echo hi > /tmp/a.txt
> REMOTE$ ln -svi /tmp/{a,b}.txt
>
> Visiting the symlink from another host using SSH works as expected:
>
> emacs -Q /ssh:REMOTE:/tmp/b.txt
>
> But the same fails with SSHFS:
>
> emacs -Q /sshfs:REMOTE:/tmp/b.txt
>
> TRAMP prints a message "File exists, but cannot be read", and the buffer
> stays empty.

SSHFS interprets symbolic links on the local host. An absolute file name
cannot work, therefore.

I've added ("-o" "transform_symlinks") to the tramp-mount-args of the
sshfs Tramp method. This shall fix it. Pls unmount any sshfs mounts
prior testing, otherwise it wouldn't work.

An alternative would be to use ("-o" "follow_symlinks"). But this has
the disadvantage that symbolic links look like regular files then, so I
haven't used it.

Pushed to the repositories. You'll find it on the master branch, and in
the upcoming GNU ELPA Tramp 2.5.2.2. Closing the bug.

Best regards, Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]