2
I try to upload localDir
to remote server i follow this guide SFTP Guide
but when upload the localDir
and go inside i see blankDir I did the following
sftp> lls
404.html crm nginx-logo.png test.php
sftp> ls
crm
sftp> put -r crm /usr/share/nginx/html
Uploading crm/ to /usr/share/nginx/html/crm
Entering crm/
I created crm
dir according to the following note in SFTP Guide
Note
There is currently a bug in the versions of OpenSSH shipped with current >Ubuntu releases (at least 14.04 to 15.10) that prevents the above command >from operating correctly. Upon issuing the command above to transfer content >to a server using the buggy version of OpenSSH, the following error will be >given: Couldn't canonicalise: No such file or directory.
To work around this issue, create the destination directory on the remote >end first by typing mkdir localDirectory. Afterwards, the above command >should complete without error.
but upload file working well.
Any Suggestions ?
yeah i know the help guide for SFTP by
help or ?
i will update my que – Just User – 2016-01-12T19:04:48.347I have all permissions , i uploaded file to this dir to check worked well – Just User – 2016-01-12T19:19:17.087
The same result
sftp> put -r crm Uploading crm/ to /usr/share/nginx/html/crm Entering crm/
After
mkdir crm2
andls
i seecrm2
– Just User – 2016-01-12T19:29:31.933The SFTP Guide with my Que note us to create this dir look at
put section
– Just User – 2016-01-12T19:37:38.3731Yes, I see where it shows
put -r localDirectory
with thelocalDirectory
in your case will be/crm
but the location where you are uploading it to on the server (/usr/share/nginx/html/
) the /crm is already there. If you're in/usr/share/nginx/html/
then runrmdir crm
and then do theput -r crm
to see if it shows what you're expecting. I think the/crm
is already where you are trying to upload it to, or I'm totally lost which is absolutely possible... put I do FTP stuff all the time... Perhaps the error isn't clear to me. – Pimp Juice IT – 2016-01-12T19:42:35.007sftp> pwd Remote working directory: /usr/share/nginx/html sftp> lpwd Local working directory: /var/www/nginx/html sftp> put -r crm Uploading crm/ to /usr/share/nginx/html/crm Couldn't canonicalize: No such file or directory Unable to canonicalize path "/usr/share/nginx/html/crm"
– Just User – 2016-01-12T19:46:46.2571I noticed where it said the workaround to that issue you added to your answer is to make the directory first and then upload it. So you'd run
mkdir crm
and then runput -r crm
. – Pimp Juice IT – 2016-01-12T19:47:13.330I swear i did that i created
crm
before uplodaing – Just User – 2016-01-12T19:48:30.010this issue drive me to crazy , anyway you deserve a big thank for your help . – Just User – 2016-01-12T19:50:32.557