GNU bug report logs - #28896
Dired move of directory to remote with TRAMP (ssh) fails

Previous Next

Package: emacs;

Reported by: adam plaice <plaice.adam+lists <at> gmail.com>

Date: Wed, 18 Oct 2017 23:47:02 UTC

Severity: normal

Fixed in version 26.1

Done: Adam Plaice <plaiceadam <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28896 in the body.
You can then email your comments to 28896 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#28896; Package emacs. (Wed, 18 Oct 2017 23:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to adam plaice <plaice.adam+lists <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 18 Oct 2017 23:47:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: adam plaice <plaice.adam+lists <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Dired move of directory to remote with TRAMP (ssh) fails
Date: Thu, 19 Oct 2017 00:46:42 +0100
Moving a directory from the local system to a remote ssh tramp directory fails

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 <at> 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 — for instance C-x d /ssh:username <at> 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 <at> hostname:/path/on/remote/a...failed
Move ‘/home/adam/test_dired_copy/a’ to
‘/ssh:username <at> hostname:/path/on/remote/a’ 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 <at> hostname:/path/on/remote/b
M-x dired /ssh:username <at> 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 <at> hostname:/path/on/remote/b to
/home/adam/test_dired_copy/b...failed
Move ‘/ssh:username <at> hostname:/path/on/remote/b’ to
‘/home/adam/test_dired_copy/b’ 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 — that results
   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=ibus
  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))




Added blocking bug(s) 24655 Request was from Michael Albinus <michael.albinus <at> gmx.de> to control <at> debbugs.gnu.org. (Thu, 19 Oct 2017 17:53:02 GMT) Full text and rfc822 format available.

Added indication that bug 28896 blocks24655 Request was from Michael Albinus <michael.albinus <at> gmx.de> to control <at> debbugs.gnu.org. (Thu, 19 Oct 2017 17:58:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28896; Package emacs. (Thu, 19 Oct 2017 18:06:02 GMT) Full text and rfc822 format available.

Message #12 received at 28896 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: adam plaice <plaice.adam+lists <at> gmail.com>
Cc: 28896 <at> debbugs.gnu.org
Subject: Re: bug#28896: Dired move of directory to remote with TRAMP (ssh)
 fails
Date: Thu, 19 Oct 2017 20:00:24 +0200
adam plaice <plaice.adam+lists <at> gmail.com> writes:

Hi Adam,

> Moving a directory from the local system to a remote ssh tramp directory fails

Thanks for your detailed report!

I could reproduce the problem. Yes, it is rename-file which ceases to
work. copy-file shows similar problems, when the source is a directory.

I didn't find a quick fix, but at least I have extended tramp-tests.el
already with respective tests :-)

Will work on this next days, for all involved backends, in order to have
it fixed for Emacs 26. I'm marking this bug as blocking bug#24655, the
Emacs 26.1 release bug.

> Thanks for reading the bug and working on emacs!
> Adam

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28896; Package emacs. (Fri, 20 Oct 2017 10:55:02 GMT) Full text and rfc822 format available.

Message #15 received at 28896 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: adam plaice <plaice.adam+lists <at> gmail.com>
Cc: 28896 <at> debbugs.gnu.org
Subject: Re: bug#28896: Dired move of directory to remote with TRAMP (ssh)
 fails
Date: Fri, 20 Oct 2017 12:54:26 +0200
adam plaice <plaice.adam+lists <at> gmail.com> writes:

Hi Adam,

> 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.

I've fixed this in the Emacs repository, emacs-26 branch. Could you,
pls, crosscheck?

Since the fix is only in the Tramp files, you might also download the
recent files from the Tramp git repository, and test for Emacs 24 and
25. I haven't done, but I expect it is fixed there as well.

Emacs 23 is not supported any longer by recent Tramp.

> Thanks for reading the bug and working on emacs!
> Adam

Best regards, Michael.




Reply sent to Adam Plaice <plaiceadam <at> gmail.com>:
You have taken responsibility. (Fri, 20 Oct 2017 17:04:02 GMT) Full text and rfc822 format available.

Notification sent to adam plaice <plaice.adam+lists <at> gmail.com>:
bug acknowledged by developer. (Fri, 20 Oct 2017 17:04:03 GMT) Full text and rfc822 format available.

Message #20 received at 28896-done <at> debbugs.gnu.org (full text, mbox):

From: Adam Plaice <plaiceadam <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>, 28896-done <at> debbugs.gnu.org
Subject: Re: bug#28896: Dired move of directory to remote with TRAMP (ssh)
 fails
Date: Fri, 20 Oct 2017 18:03:37 +0100
Wow, that was fast!

The bug is indeed fixed.

(Moving directories in Dired with Tramp now works both from and
to remote locations. Loading TRAMP's emacs-26 files from emacs
24.5 or 25.1 also resolves the issue in these versions of emacs.)

Thank you very much and best regards,
Adam




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28896; Package emacs. (Fri, 20 Oct 2017 17:12:01 GMT) Full text and rfc822 format available.

Message #23 received at 28896 <at> debbugs.gnu.org (full text, mbox):

From: Adam Plaice <plaiceadam <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>, 28896 <at> debbugs.gnu.org
Subject: Re: bug#28896: Dired move of directory to remote with TRAMP (ssh)
 fails
Date: Fri, 20 Oct 2017 18:11:48 +0100
Whoops... I was stupidly not aware that marking the bug as done would
(falsely) mark it as done by me (not sure how to fix this — I don't want
to mess with flags that I apparently don't understand fully).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28896; Package emacs. (Fri, 20 Oct 2017 17:33:01 GMT) Full text and rfc822 format available.

Message #26 received at 28896 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Adam Plaice <plaiceadam <at> gmail.com>
Cc: 28896 <at> debbugs.gnu.org, Michael Albinus <michael.albinus <at> gmx.de>
Subject: Re: bug#28896: Dired move of directory to remote with TRAMP (ssh)
 fails
Date: Fri, 20 Oct 2017 13:32:22 -0400
On Fri, Oct 20, 2017 at 1:11 PM, Adam Plaice <plaiceadam <at> gmail.com> wrote:
> Whoops... I was stupidly not aware that marking the bug as done would
> (falsely) mark it as done by me (not sure how to fix this — I don't want
> to mess with flags that I apparently don't understand fully).

Don't worry about it, we don't use that field value for anything (I've
marked a bunch of bugs fixed that were not actually fixed by me).

You can also consider that "Done: Adam Plaice" just means that you're
the one who confirmed it's fixed. The record of who fixed what is in
the git log.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28896; Package emacs. (Fri, 20 Oct 2017 17:45:01 GMT) Full text and rfc822 format available.

Message #29 received at 28896 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Noam Postavsky <npostavs <at> users.sourceforge.net>
Cc: 28896 <at> debbugs.gnu.org, Adam Plaice <plaiceadam <at> gmail.com>
Subject: Re: bug#28896: Dired move of directory to remote with TRAMP (ssh)
 fails
Date: Fri, 20 Oct 2017 19:44:30 +0200
Version: 26.1

Noam Postavsky <npostavs <at> users.sourceforge.net> writes:

> On Fri, Oct 20, 2017 at 1:11 PM, Adam Plaice <plaiceadam <at> gmail.com> wrote:
>> Whoops... I was stupidly not aware that marking the bug as done would
>> (falsely) mark it as done by me (not sure how to fix this — I don't want
>> to mess with flags that I apparently don't understand fully).
>
> Don't worry about it, we don't use that field value for anything (I've
> marked a bunch of bugs fixed that were not actually fixed by me).

Indeed. The only missing information is the Emacs version the bug is
closed with, which I add here.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28896; Package emacs. (Fri, 20 Oct 2017 18:31:01 GMT) Full text and rfc822 format available.

Message #32 received at 28896-done <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 28896-done <at> debbugs.gnu.org, Adam Plaice <plaiceadam <at> gmail.com>
Subject: Re: bug#28896: Dired move of directory to remote with TRAMP (ssh)
 fails
Date: Fri, 20 Oct 2017 14:30:22 -0400
Version: 26.1

I think it only works when sending nnnn-done <at> debbugs.gnu.org, although
possibly not if bug is already done; let's see...

On Fri, Oct 20, 2017 at 1:44 PM, Michael Albinus <michael.albinus <at> gmx.de> wrote:
> Version: 26.1

> Indeed. The only missing information is the Emacs version the bug is
> closed with, which I add here.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28896; Package emacs. (Fri, 20 Oct 2017 18:46:05 GMT) Full text and rfc822 format available.

Message #35 received at 28896 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 28896 <at> debbugs.gnu.org, Adam Plaice <plaiceadam <at> gmail.com>
Subject: Re: bug#28896: Dired move of directory to remote with TRAMP (ssh)
 fails
Date: Fri, 20 Oct 2017 14:45:46 -0400
fixed 28896 26.1
quit

On Fri, Oct 20, 2017 at 2:30 PM, Noam Postavsky
<npostavs <at> users.sourceforge.net> wrote:
> Version: 26.1
>
> I think it only works when sending nnnn-done <at> debbugs.gnu.org, although
> possibly not if bug is already done; let's see...

Ah, seems like it does nothing when the bug is closed already,
control <at> debbugs.gnu.org it is then.




bug Marked as fixed in versions 26.1. Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Fri, 20 Oct 2017 18:46:07 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28896; Package emacs. (Fri, 20 Oct 2017 19:26:01 GMT) Full text and rfc822 format available.

Message #40 received at 28896 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Noam Postavsky <npostavs <at> users.sourceforge.net>
Cc: 28896 <at> debbugs.gnu.org, Adam Plaice <plaiceadam <at> gmail.com>
Subject: Re: bug#28896: Dired move of directory to remote with TRAMP (ssh)
 fails
Date: Fri, 20 Oct 2017 21:25:13 +0200
Noam Postavsky <npostavs <at> users.sourceforge.net> writes:

> Ah, seems like it does nothing when the bug is closed already,
> control <at> debbugs.gnu.org it is then.

Maybe it is easier to trust debbugs.el.

Best regards, Michael.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 18 Nov 2017 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 217 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.