unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Philipp Stephani <p.stephani2@gmail.com>
Cc: 54130-done@debbugs.gnu.org
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	[thread overview]
Message-ID: <87k0dkmgwc.fsf@gmx.de> (raw)
In-Reply-To: <wvr4mtihfpjt.fsf@gmail.com> (Philipp Stephani's message of "Wed,  23 Feb 2022 18:41:58 +0100")

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	other threads:[~2022-02-24 15:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23 17:41 bug#54130: 29.0.50; TRAMP SSHFS can't visit remote files using absolute symlinks Philipp Stephani
2022-02-24 15:19 ` Michael Albinus [this message]
2022-02-24 17:04   ` Philipp Stephani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k0dkmgwc.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=54130-done@debbugs.gnu.org \
    --cc=p.stephani2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).