Parke
2014-Apr-16 22:57 UTC
Undocumented sftp put -r quirk: Couldn't canonicalize: No such file or directory
Hi, As of OpenSSH 6.5 on Ubuntu 14.04 (package version 1:6.5p1-6), there appears to be an undocumented requirement for the sftp "put -r" command. In order to "put -r foo", a remote directory named "foo" must already exist. If a remote directory named foo does not exist, the following (confusing) error message is displayed: sftp> put -r foo Uploading foo/ to /home/user/test/foo Couldn't canonicalize: No such file or directory Unable to canonicalize path "/home/parke/test/foo" I recommend that this requirement be documented in the sftp manpage. I can draft language, if needed. The error message could also be more helpful. For example: "Required remote directory "foo" does not exist." There is related discussion on stack exchange: http://unix.stackexchange.com/questions/7004/uploading-directories-with-sftp http://stackoverflow.com/questions/17477226/what-cause-the-error-couldnt-canonicalise-no-such-file-or-directory-in-sftp Thanks! -Parke
Damien Miller
2014-Apr-17 03:45 UTC
Undocumented sftp put -r quirk: Couldn't canonicalize: No such file or directory
On Wed, 16 Apr 2014, Parke wrote:> Hi, > > As of OpenSSH 6.5 on Ubuntu 14.04 (package version 1:6.5p1-6), there > appears to be an undocumented requirement for the sftp "put -r" > command. In order to "put -r foo", a remote directory named "foo" > must already exist.Could you file a bug for this at https://bugzilla.mindrot.org/ ? IMO the directory should be created if it doesn't exist, just like "cp -r" does. -d
Apparently Analagous Threads
- [Bug 2230] New: Undocumented sftp put -r quirk: Couldn't canonicalize: No such file or directory
- Fwd: sftp buggy put command
- Re: [PATCH 1/2] inspect: fstab: Canonicalize paths appearing in fstab.
- Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path
- Re: [libvirt] Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path