SSH_FX_PERMISSION_DENIED: Failed opening remote file [libssh2_sftp_open]

Get help for specific problems
Posts: 8
Joined: 28 Feb 2020

Alex Fogerty

Hi guys,

I'm getting this error message:

Error Cannot open file "sftp://[REDACTED]/20260612_20260613_0001.xml.zip". SSH_FX_PERMISSION_DENIED: Failed opening remote file [libssh2_sftp_open]

When I do the same thing with FileZilla it works perfectly.


I saw this was a topic of discussion from 2017, but I can't see anything more recent.

viewtopic.php?t=2420

- The permissions are correct, the folders are either drwxr-xr-x or drwxrwxr-x
- I have unticked "Use database file to detect changes"
- I have disabled "Fail-Safe File Copy"
- I have modified all copies of GlobalSettings.xml so that LockDirectoriesDuringSync Enabled="false"


Any ideas why the Update Synchronisation is still not working?
Posts: 8
Joined: 28 Feb 2020

Alex Fogerty

I've had to set it up using WinSCP. I'm guessing the libssh2_sftp_open does something different that requires a higher level of file access than the SFTP server provides.
Posts: 170
Joined: 5 Jan 2024

John1234

Hi,

Can you provide some additional information such as the platforms that you're using what is the client and what is the server and what programs are you using on the server?
Posts: 8
Joined: 28 Feb 2020

Alex Fogerty

The client is a Microsoft Windows Server 2022 Standard. The SFTP server is a blackbox since it isn't under my control.

For security reasons I can't really give you a list of programs running on the client.
Posts: 170
Joined: 5 Jan 2024

John1234

Hi,

No need for any information regarding software. I did a little research and found the reason why you are seeing the results that you do.

FFS not only needs that Library it is bundled with the software.

Winscp uses a different method of authentication and therefore it does not require that Library.

Here are the results of my research
User avatar
Site Admin
Posts: 7523
Joined: 9 Dec 2007

Zenju

The error happens after authentication, so this is not the issue.

If the server is running Windows, let's try something. Does the following version work (it additionally requests write access):
https://www.mediafire.com/file/p1xlotb1etkmla2/FreeFileSync_14.10_%255BBeta%255D_Windows_Setup.exe
Posts: 8
Joined: 28 Feb 2020

Alex Fogerty

Hi Zenju,

I have installed the beta version, the error message has changed to a warning and completed successfully:

Cannot write modification time of "sftp://[REDACTED].xml.zip".
SSH_FX_OP_UNSUPPORTED [libssh2_sftp_setstat]