Subject: bug#57044: 29.0.50; tramp-error: Reading directory: Permission denied, /scp:motorolausb:/storage/emulated/0/

From: Michael Albinus <[email-masked]>
Date: Tue, 16 Aug 2022 08:06:19 +0200

Jean Louis <[email-masked]> writes:

Hi Jean,

> I will try your suggestions now, but I must say I used Tramp on same
> devices previously without problems. Some change was introduced
> somewhere that I can't access them anymore.
>
> I did not try it yet, I will do now.

Please do. Pull recent commits from Emacs git, recompile Emacs, and run
"emacs -Q" as explained. Send the debug buffer when it fails.

In my environment, it runs smoothly. So we have a chance to
see what's the difference.

> I already have i remote path the Termux PATH for executables.
>
> tramp-remote-path is a variable defined in ‘tramp.el’.
>
> Its value is
> (tramp-default-remote-path "/data/data/com.termux/files/usr/bin/"
> "/bin" "/usr/bin" "/sbin" "/usr/sbin" "/usr/local/bin"
> "/usr/local/sbin" "/local/bin" "/local/freeware/bin" "/local/gnu/bin"
> "/usr/freeware/bin" "/usr/pkg/bin" "/usr/contrib/bin" "/opt/bin"
> "/opt/sbin" "/opt/local/bin")

Looks good. I would take "/data/data/com.termux/files/usr/bin" (no
trailing slash), but this is a minor difference which shouldn't count.

With this, you don't need my proposed tramp-remote-path hack, I
assume. But somehow, in the debug buffer you've sent recently, just
"/sbin" was selected for the PATH, and I don't know why.

Best regards, Michael.