From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#57044: 29.0.50; tramp-error: Reading directory: Permission denied, /scp:motorolausb:/storage/emulated/0/ Date: Mon, 15 Aug 2022 14:13:49 +0200 Message-ID: <87lerpu2ki.fsf@gmx.de> References: <86czdb3lg4.fsf@protected.rcdrun.com> <87edxrkt8d.fsf@gmx.de> <87v8qxg1o8.fsf@gmx.de> <87h72gfpgd.fsf@gmx.de> <87k07aj29b.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24033"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 57044@debbugs.gnu.org To: Jean Louis Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 15 14:15:55 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oNZ0b-00066q-Tg for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 14:15:53 +0200 Original-Received: from localhost ([::1]:40914 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNZ0a-00022y-9J for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 08:15:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNYzn-00022R-5c for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 08:15:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51401) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oNYzm-0006la-Pp for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 08:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oNYzm-0007g9-H1 for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 08:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Aug 2022 12:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57044 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 57044-submit@debbugs.gnu.org id=B57044.166056567229469 (code B ref 57044); Mon, 15 Aug 2022 12:15:02 +0000 Original-Received: (at 57044) by debbugs.gnu.org; 15 Aug 2022 12:14:32 +0000 Original-Received: from localhost ([127.0.0.1]:41150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNYzI-0007fF-1v for submit@debbugs.gnu.org; Mon, 15 Aug 2022 08:14:32 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:57693) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNYzF-0007f2-JS for 57044@debbugs.gnu.org; Mon, 15 Aug 2022 08:14:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1660565630; bh=LyoSBU2p2MS+rFQ0yUvQBSSvRwRgmcYbdDvtueVcQtI=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=AAthq6SbNdZiQeYvoNZyn4KyKquNDYCngq1lr8aox96SmAo9Y5KcXNEjvpSgpsoYW YM0jB0gnKcVumg46fRCpdF8sxpm+g22rnx4emquKssoI34cbMm0nkL7f8/qmPz2Rpf AmMBvGrPZ1YsEC6SO3FuHWtiUNTAIqzYLa2ERnDQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([79.140.119.86]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MYvcA-1nsmXG1bvM-00Usxz; Mon, 15 Aug 2022 14:13:50 +0200 In-Reply-To: <87k07aj29b.fsf@gmx.de> (Michael Albinus's message of "Sun, 14 Aug 2022 17:03:44 +0200") X-Provags-ID: V03:K1:THN2jXVe7OXVTTcTvjUnvaYyBOdGTAKcKUb9CMH/YdkOr9/oBNa RThnAvaQsnpoyCIE1pzjST82yO/nicPmp1TmjsPNfWvmxaPzAWFjns/+yeMWaqCGvjX4eFP 2pMIP7uGzxdJiFHqBUdF1+Qz6zQTre39UWlh3BhLvL2V+W9kYRplzoq2NOOiopVXjFbPHPf rl1CHYJdOq6VgD/mMheiQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:xKEWE3e06Rg=:Sv0dKMOyzmyxlXFBkRUCgi 5b62vvjcLkQIAWOx+QuHpXd4MQuHQi59lCzFwbnk4PR/d1/4AIMWWD0LTvZoSACTV997/bMcN UEhPjhPXIiMA5vKouq0fuuGizbdVkNiOnLYe7YKUwpmioY01gY7WS35fTIM//Yp++Uwl6DJos KGRM6soecVX4du1jYi4uX3CuyOSVlM/s9Hjc7IabwTBtrT2FTB2l8b210+tbeVkRK2jDK7wBW +Arvur5hw6EMMmP9RJyEYZEn3oVgNwY2n+hQsm79xWuXeRC5Md12GiermE4pZsTVdRa2nJTf7 AnQ9E2R+8nYUoRjtH7wKB8aaCRPfKmayIChkPk9jf6fIqrSfkU4aLOeHDLi7jOCvoUFg6vgHf LM39IeWMKHr/h/H4Y6oE1KKHZZsGEYwKujnjajHfdHsztusvJtC5gdOFdPCbKFcDacLMRcERQ NbMVkYxItjip/jTNlW6KtH2Eo/rUD9u0XAAF3Riti51XaQKzWxomLr4FQp9BfD10larXTzFWl gAb56niWfdokuM5eUBQhIBNCiEqVh2VkLOD7AOn9OoXnGhxoRahIKsdpmduSMhheg7PseGCzm LvdDKCb0/YnjgBzXC697sByu1mRNuWAnmSAmmOK0I3uZqsskb8jrVd4ghf8r4UKmeUJvSiGqr eaTgzo8Sh5H29fB6IJBvZhtjE1dJMJ5Q25m5Tw2L30f+PoRHXdSdP6IDoFOKFHx/uGXCN2U5Z CaW85GAWSHEVpqCwAriRuK+H6glX8XOu9XNRYSNQAhn0n5+2uXL1NibgVaH22QylDU1Sh5Kj X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:239791 Archived-At: Michael Albinus writes: Hi Jean, Finally, I've been successful to install termux properly. That gives me the understanding what happens. > - Apply the needed settings, like > > (setq tramp-verbose 10 > tramp-connection-properties '(("ssh:motorola" "tmpdir" "/storage/emulated/0/tmp")) > tramp-remote-path '(...) > tramp-remote-process-environment '(...)) > >> 07:10:57.056208 tramp-send-command (6) # while read d; do if test -x $d/ls && test -f $d/ls; then echo tramp_executable $d/ls; break; fi; done <<'b43631a7d2938506927af066a6b54cbc' >> /sbin >> b43631a7d2938506927af066a6b54cbc >> 07:10:57.060465 tramp-wait-for-regexp (6) # >> ///fc5b092ac8d0a3784e7c5443fffe4f12#$ > > It searches only (!) in /sbin, and I don't know why. This the problem, indeed. tramp-remote-path uses directories like "/usr/bin". But in Termux, there is a prefix, and the directory is "/data/data/com.termux/files/usr/bin". So we must add this prefix to all file names in tramp-remote-path. I've fixed this by declaring tramp-remote-path as connection-local variable. After calling "emacs -Q -l tramp", all what I needed was --8<---------------cut here---------------start------------->8--- (setq tramp-connection-properties '(("/ssh:Samsung-SM-G920F-Michael-Albinus:" "tmpdir" "~/tmp")) (connection-local-set-profile-variables 'tramp-connection-local-termux-profile `((tramp-remote-path . ,(mapcar (lambda (x) (if (stringp x) (concat "/data/data/com.termux/files" x) x)) (copy-tree tramp-remote-path))))) (connection-local-set-profiles '(:application tramp :machine "Samsung-SM-G920F-Michael-Albinus") 'tramp-connection-local-termux-profile) --8<---------------cut here---------------end--------------->8--- "Samsung-SM-G920F-Michael-Albinus" is the name of my Android device, and "~/tmp" the temporary directory I have created. Would you like to try it? >> Jean Best regards, Michael.