Lxc file push gives Error: sftp SSH_FX_FAILURE

I’m trying to push files to a lxc (container is a vm) with the following command, which throws an error:

erik@frozen:~/dwellir$ lxc file push -r ./notestutorial u1vm/
Error: sftp: "mkdir /notestutorial/.git: not a directory" (SSH_FX_FAILURE)
erik@frozen:~/dwellir$

Whats the deal here?

Hmm, did it create /notestutorial in the guest?

Nope, I tried with “-p” aswell.

Old issue, but I ran into this error today. In my case, I was trying to copy a directory to a container. This is the command I was using:

lxc file push -r -p spark sparkmaster/home/hadoop/

I received the following error:

Error: sftp: "open /home/hadoop/spark/LICENSE: not a directory" (SSH_FX_FAILURE)

It turns out earlier testing had created a write-protected file called sparkmaster/home/hadoop/spark. After deleting this file manually, the above command worked fine.

1 Like