From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: adam plaice Newsgroups: gmane.emacs.bugs Subject: bug#28896: Dired move of directory to remote with TRAMP (ssh) fails Date: Thu, 19 Oct 2017 00:46:42 +0100 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1508370433 30251 195.159.176.226 (18 Oct 2017 23:47:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 18 Oct 2017 23:47:13 +0000 (UTC) To: 28896@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 19 01:47:08 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4y3F-0006hT-5a for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Oct 2017 01:47:05 +0200 Original-Received: from localhost ([::1]:46920 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4y3M-0005Ne-Lc for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Oct 2017 19:47:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4y3E-0005NF-6q for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2017 19:47:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4y3C-0007mU-Vc for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2017 19:47:04 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40194) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e4y3C-0007mH-RA for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2017 19:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e4y3C-0008FE-KA for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2017 19:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: adam plaice Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Oct 2017 23:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28896 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.150837041631678 (code B ref -1); Wed, 18 Oct 2017 23:47:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Oct 2017 23:46:56 +0000 Original-Received: from localhost ([127.0.0.1]:48875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4y36-0008Es-1Q for submit@debbugs.gnu.org; Wed, 18 Oct 2017 19:46:56 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60511) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4y34-0008Eb-J9 for submit@debbugs.gnu.org; Wed, 18 Oct 2017 19:46:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4y2y-0007gA-3O for submit@debbugs.gnu.org; Wed, 18 Oct 2017 19:46:49 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:45402) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e4y2x-0007g1-Vi for submit@debbugs.gnu.org; Wed, 18 Oct 2017 19:46:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51481) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4y2w-0005Lq-9I for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2017 19:46:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4y2u-0007eO-WF for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2017 19:46:46 -0400 Original-Received: from mail-yw0-x22c.google.com ([2607:f8b0:4002:c05::22c]:54208) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e4y2u-0007df-QL for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2017 19:46:44 -0400 Original-Received: by mail-yw0-x22c.google.com with SMTP id x131so2055583ywa.10 for ; Wed, 18 Oct 2017 16:46:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to :content-transfer-encoding; bh=Gj7InklTvBqvbdlgRByaj0z/GZ1qLfhVE49Lwp+zbQw=; b=WCnKkNgO90rgAP/PB2b/eromkWCyvi8yPikDFsXzBBmeQtDet8GTRgRW429tiiY+sn hSLclvgNddxpUviYpVzPbHP/ePCprEsbn+DfACwbKAiPC4yErJze09u2vq1a3134MugG DPZLnBLnjW3Bjsg+MMh7OnHhiAAlbMkgrFyURUBXM0eD36ltSt40mYXrDHMSWFuXq3s4 vnuiJHUfMDAgM/2Z/Bjj2fTJVCHObYXQXtu6q2eqx2+kYNdAMkKBhemYC6Py/9yJLRXz tyhINoeWG5f0zliqBmpQw2HxeYKd95qC9DsN65PlqliD2fepuNXBggyDponGHzfRy02W vzpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to:content-transfer-encoding; bh=Gj7InklTvBqvbdlgRByaj0z/GZ1qLfhVE49Lwp+zbQw=; b=D2GBf2p+9ixEHnvuBVOxfBH4SnJ0nD2u7fVU5J8Hfk4cnDlIcL+8hcvCTBZsU98ktJ C1YJW5Q3PrmDrkoMy2TK3SgCjpqhC/qubeyJ4eCl4eg2GzgAw3EoRr3TdksYGsmJBsHG JNzZepJ8cRs/hNHwrVrE1EF7wbrkiQdEKgZ7dU+wQwqhr5z2Y97yhkQvH9OiGIJKs1Al nGp2xhTVTMI0PafGLcVA+7HNuaRRbWjxA5cLFAfhfW2C/fM4MU9xnx2Bhvx7xAgwekrl c31zygPE79fTzdLcA88eBNNmkFrQ0K1azNPBy6WeiSAjClIvYDzGjJy02BC9odGYwR/S Z7gw== X-Gm-Message-State: AMCzsaXSVMSPM+CRMe2VPF8SClLea13mUF2vQ+LuWSmcG21jp2GP8qzp 8m3/0fLkRvaeRGEmxAuwobN7UARH9orIh+cos0k= X-Google-Smtp-Source: ABhQp+SzPt0pOpMYwh6B2cNAfmoyQsaC+CucC7Eoih1alg+TeNEbX/LEQlz3blJ5xtUWI5r2YMfLqXtxc6PglIuYHDI= X-Received: by 10.129.101.87 with SMTP id z84mr2652657ywb.482.1508370402572; Wed, 18 Oct 2017 16:46:42 -0700 (PDT) Original-Received: by 10.37.179.68 with HTTP; Wed, 18 Oct 2017 16:46:42 -0700 (PDT) X-Google-Sender-Auth: fM-Ru_Thyhn1-ogiw5kF5hEJVY8 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:138697 Archived-At: Moving a directory from the local system to a remote ssh tramp directory fa= ils To reproduce: mkdir test_dired_copy/a -p cd test_dired_copy emacs -Q --eval '(dired ".")' In dired, execute `dired-do-rename' (kbd "R") on the `a' directory and select a remote (writable) destination using the Tramp ssh method, for instance: /ssh:username@hostname:/path/on/remote/ . (I've tried to consistently replace the details of the remote with dummy values (the username with `username', the hostname with `hostname' and the path of the directory into which `a' should be copied with `/path/on/remote/'). I'm not mis-typing the paths when testing =E2=80=94 for instance C-x d /ssh:username@hostname:/path/on/remote= / works as expected.) Expected result: The directory `a' is moved ("renamed") into the remote destination. Actual result: The directory `a' remains in test_dired_copy, does not appear on the remote system and the following error message is displayed: Renaming /home/adam/test_dired_copy/a to /ssh:username@hostname:/path/on/remote/a...failed Move =E2=80=98/home/adam/test_dired_copy/a=E2=80=99 to =E2=80=98/ssh:username@hostname:/path/on/remote/a=E2=80=99 failed: (file-error Read error Is a directory /home/adam/test_dired_copy/a) * What also does not work (I assume this is related, but I may be wrong): ** Moving a directory from a remote ssh tramp directory to the local system mkdir -p test_dired_copy emacs -Q M-x mkdir /ssh:username@hostname:/path/on/remote/b M-x dired /ssh:username@hostname:/path/on/remote/ In dired, execute `dired-do-rename' (kbd "R") on the `b' directory and select a local destination (for instance /home/adam/test_dired_copy/ ). *** Expected result: (1. The remote directory b is created.) 2. The remote directory b is moved to the local destination. *** Actual result: (1. The remote directory b is created, as expected.) 2. The remote directory b is not moved and the following error message is displayed: Renaming /ssh:username@hostname:/path/on/remote/b to /home/adam/test_dired_copy/b...failed Move =E2=80=98/ssh:username@hostname:/path/on/remote/b=E2=80=99 to =E2=80=98/home/adam/test_dired_copy/b=E2=80=99 failed: (file-error Encoding remote file failed) * What does work ** Copying a directory from the local system to a remote one and vice-versa (i.e. exactly as above, but using `dired-do-copy' ("C") rather than `dired-do-rename', in either direction) ** Moving a file from the local to the remote system and vice-versa (i.e. instead of using `dired-do-rename' on a directory, use it on a "normal" file) ** Moving a directory from one location on the remote to another on the same remote (but NOT one on a different remote =E2=80=94 that result= s in the same error as trying to move from the remote to the local system)= . ** Moving a directory on the local system, but to a location managed with the Tramp sudo method. (Moving from, say `/home/adam/test1/a' to `/sudo::/home/adam/test2/'). This strongly suggests that the issue is not with Tramp, as such, but with the interaction with the backend. The bug is present on all versions of emacs that I've tested (from 23.4, through 24.5 and 25.1 to master (94281c9a1cc0f756841fdc9b266657853df94a29) and emacs-26 (2f7163fb72e764d2df046a4d816e1e0b81e41d18)). All the systems tested (local and remote) were Ubuntu 16.04.3. Note that this was previously misreported as part of #28519. Obviously, since copying a directory and then deleting it from the source, both work, one can easily circumvent the bug when using dired, if one remembers. Thanks for reading the bug and working on emacs! Adam In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2017-10-18 built on adam Repository revision: 94281c9a1cc0f756841fdc9b266657853df94a29 Windowing system distributor 'The X.Org Foundation', version 11.0.11804000 System Description: Ubuntu 16.04.3 LTS Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --without-pop' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 LIBSYSTEMD LCMS2 Important settings: value of $LANG: en_GB.UTF-8 value of $XMODIFIERS: @im=3Dibus locale-coding-system: utf-8-unix Major mode: Dired by name Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq rfc822 mml easymenu mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils files-x tramp-cache tramp-sh tramp tramp-compat tramp-loaddefs trampver ucs-normalize shell pcomplete comint ansi-color ring parse-time format-spec advice auth-source cl-seq eieio byte-opt bytecomp byte-compile cconv eieio-core cl-macs gv eieio-loaddefs password-cache dired-aux cl-loaddefs cl-lib dired dired-loaddefs term/rxvt term/xterm xterm time-date elec-pair mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 226072 10274) (symbols 48 22318 2) (miscs 40 43 162) (strings 32 36033 1632) (string-bytes 1 1039349) (vectors 16 36805) (vector-slots 8 717154 12552) (floats 8 72 671) (intervals 56 262 0) (buffers 992 15) (heap 1024 16769 1304))