tramp-devel
[Top][All Lists]
Advanced

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

Re: sftp access method fails on Emacs master


From: Stephen Berman
Subject: Re: sftp access method fails on Emacs master
Date: Mon, 08 Apr 2019 12:19:56 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

On Mon, 08 Apr 2019 11:58:59 +0200 Michael Albinus <address@hidden> wrote:

> Stephen Berman <address@hidden> writes:
>
> Hi Steve,
>
>> I did that and rebuilt, but still get
>> the connection failure.  I made another trace as per your previous
>> instructions and attach it compressed.  Here's hoping...
>
> Thanks for the traces. It's complicate, because Tramp does not get
> enough information from the remote side via "gio info". So I've added a
> heuristic to tramp-gvfs-handle-file-readable-p. It might return false
> positives (claiming files being readable which aren't), but this is
> better then denying access to readable files.
>
> Could you pls try the appended patch instead of the other one?

That works :-) Thanks!  (Are you saying the problem was due to an
insufficieny in "gio info"?  Would a bug report there be appropriate?)

Steve

PS: I realized I unintentionally omitted the list email address at some
point in this thread, so I've reinstated it now.  The traces didn't
contain any private data, but I don't think it's worth reposting them to
the list.

>
> Best regards, Michael.
>
> *** /tmp/ediffC7p7xf  2019-04-08 11:52:46.923938168 +0200
> --- /home/albinus/src/tramp/lisp/tramp-gvfs.el        2019-04-08 
> 11:46:31.139001718 +0200
> ***************
> *** 1136,1142 ****
>     "Like `file-executable-p' for Tramp files."
>     (with-parsed-tramp-file-name filename nil
>       (with-tramp-file-property v localname "file-executable-p"
> !       (tramp-check-cached-permissions v ?x))))
>
>   (defun tramp-gvfs-handle-file-name-all-completions (filename directory)
>     "Like `file-name-all-completions' for Tramp files."
> --- 1136,1143 ----
>     "Like `file-executable-p' for Tramp files."
>     (with-parsed-tramp-file-name filename nil
>       (with-tramp-file-property v localname "file-executable-p"
> !       (and (file-exists-p filename)
> !        (tramp-check-cached-permissions v ?x)))))
>
>   (defun tramp-gvfs-handle-file-name-all-completions (filename directory)
>     "Like `file-name-all-completions' for Tramp files."
> ***************
> *** 1258,1264 ****
>     "Like `file-readable-p' for Tramp files."
>     (with-parsed-tramp-file-name filename nil
>       (with-tramp-file-property v localname "file-readable-p"
> !       (tramp-check-cached-permissions v ?r))))
>
>   (defun tramp-gvfs-handle-file-system-info (filename)
>     "Like `file-system-info' for Tramp files."
> --- 1259,1278 ----
>     "Like `file-readable-p' for Tramp files."
>     (with-parsed-tramp-file-name filename nil
>       (with-tramp-file-property v localname "file-readable-p"
> !       (and (file-exists-p filename)
> !        (or (tramp-check-cached-permissions v ?r)
> !            ;; If the user is different from what we guess to be
> !            ;; the user, we don't know.  Let's check, whether
> !            ;; access is restricted explicitly.
> !            (and (/= (tramp-gvfs-get-remote-uid v 'integer)
> !                     (tramp-compat-file-attribute-user-id
> !                      (file-attributes filename 'integer)))
> !                 (not
> !                  (string-equal
> !                   "FALSE"
> !                   (cdr (assoc
> !                         "access::can-read"
> !                         (tramp-gvfs-get-file-attributes filename)))))))))))
>
>   (defun tramp-gvfs-handle-file-system-info (filename)
>     "Like `file-system-info' for Tramp files."



reply via email to

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