Skip to content
Advertisement

How to confirm SFTP file delivery?

I am sending a file using SFTP and public key for non-root user, looks like the file is sent, but I cant find it on the target folder, maybe due to permission.

JavaScript

here is the -vvv :

JavaScript

target directory

JavaScript

How can I make sure the file is delivered, without server access ?

Advertisement

Answer

All you can do is to check that there are no errors, when uploading the file. That’s all information the SFTP server gives you.

With command-line OpenSSH sftp client, you can check its exit code (you need to use the -b switch).

JavaScript

See also How to perform checksums during a SFTP file transfer for data integrity?


It’s perfectly possible that the SFTP server does not allow you to download a file that you have just uploaded.

There are two common reasons for such behavior:

  • Public “upload” directory. This is to prevent you from downloading other user’s files.
  • There’s some process that immediately picks uploaded file for some processing.
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement