- Package:
- openssh-client
- Source:
- openssh
- Description:
- secure shell (SSH) client, for secure access to remote machines
- Submitter:
- "brian m. carlson"
- Date:
- 2014-12-09 06:21:04 UTC
- Severity:
- normal
When I use the command line sftp client and try to use "put -r", I get the error 'Unable to canonicalize path "/home/bmc/foodir"'. I suppose that is because the directory in question does not exist (that's why I'm uploading it). A normal put works just fine, but obviously that doesn't work for directories. Also, using "put -r" works if the destination directory (below, /home/bmc/foodir) already exists. scp works fine. Both machines are running Debian amd64/sid using GSSAPI authentication (which works fine since I'm able to do an ls). If there's something that you'd like me to test, please let me know. Transcript: bmc@lakeview:/tmp (2011-01-28/15:50:19)(pts/9)(ac+99%)(ok) lakeview ok % sftp castro Connected to castro. sftp> ls Maildir bin checkouts emul patches procmail.log public_html share telemarketers tmp version-controlled workspaces writings sftp> put -r foodir Uploading foodir/ to /home/bmc/foodir Couldn't canonicalise: No such file or directory Unable to canonicalise path "/home/bmc/foodir" sftp> ^D
I can confirm this bug. I am attempting to upload files onto my webserver using sftp. As far as I can tell from reading the man pages and searching online, the correct syntax once connected via sftp is: put -r * I keep getting the, "Unable to Canonicalise" error. This is a fundamental need out of an sftp program. Is there a scheduled fix for this? Is there anything I can do to help?
Seems that sftp does not support recursive coping. Some people recommend use: $ rsync --delete --rsh=ssh -av $LOCAL $HOST:$REMOTE or: tar -cf - $LOCAL | ssh $HOST " ( cd $REMOTE ; tar -xf - )" Look for discussion: http://unix.stackexchange.com/questions/7004/uploading-directories-with-sftp
Also note that: http://blog.naoar.com/2012/04/sftp-recursive-option-not-working-huh.html workaround problem by creating destination dir firstly.
direct use of put -r not possible... directories are needed to be created first...problem solved... cheers -Aakash :-)