Permission Denied, Error Code 3 intermittent on reading files WinSCP says I have access to.
We have an SFTP server for our company that is used by groups internally, providers and customers externally to swap files.
Every so often, WinSCP will give us a Permission Denied, Error Code 3 trying to download a file – even though WinSCP says we have read access to it.
WinSCP shows the remote folder as having rwxrwxr_x and every single file in the folder as having rw_r__r__
Today, it's hung up on a file called xx_val.zip.
I enabled logging and every file in that folder comes down in the log as it does in the UI:
I can download every other file in the folder but when I hit this one file I get:
I found other posts suggesting disabling the Preserve Timestamp option and setting the Ignore Permission Errors option. I tried those and got the same result as above (with changes to the log lines for options).
I found other posts saying "use putty to connect" and "use sudo to change the permissions" or "use a different client" but I have no superuser options on this public-facing shared server, so those are not something I can try.
I have no idea why WinSCP breaks on files randomly - and on those files it says it *should* have access to.
Any ideas?
Thanks
Mark
Every so often, WinSCP will give us a Permission Denied, Error Code 3 trying to download a file – even though WinSCP says we have read access to it.
WinSCP shows the remote folder as having rwxrwxr_x and every single file in the folder as having rw_r__r__
Today, it's hung up on a file called xx_val.zip.
I enabled logging and every file in that folder comes down in the log as it does in the UI:
. 2025-05-20 14:01:16.244 XX.YY;-;2174143;2025-05-20T01:02:38.000Z;3;"" [0];"" [0];rw-r--r--;0
. 2025-05-20 14:01:27.218 Copying 1 files/directories to local directory "C:\Users\XXX\Documents\" - total size: 2,174,143 . 2025-05-20 14:01:27.218 PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: Yes; Mask: *.* . 2025-05-20 14:01:27.218 TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; InclM: ; ResumeL: 0 . 2025-05-20 14:01:27.218 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml . 2025-05-20 14:01:27.218 File: '/gets/xx_val.zip' [2025-05-20T01:02:38.000Z] [2174143] . 2025-05-20 14:01:27.218 Copying "/gets/xx_val.zip" to local directory started. . 2025-05-20 14:01:27.218 Binary transfer mode selected. . 2025-05-20 14:01:27.218 Checking existence of partially transferred file. . 2025-05-20 14:01:27.218 Opening remote file. > 2025-05-20 14:01:27.218 Type: SSH_FXP_OPEN, Size: 34, Number: 2307 > 2025-05-20 14:01:27.218 03,00,00,09,03,00,00,00,10,2F,67,65,74,73,2F,63,64,5F,76,61,6C,2E,7A,69,70, > 2025-05-20 14:01:27.218 00,00,00,01,00,00,00,00,01, . 2025-05-20 14:01:27.218 Sent 38 bytes . 2025-05-20 14:01:27.218 There are 0 bytes remaining in the send buffer . 2025-05-20 14:01:27.218 Looking for network events . 2025-05-20 14:01:27.218 Timeout waiting for network events . 2025-05-20 14:01:27.218 Read 4 bytes (40 pending) . 2025-05-20 14:01:27.218 Read 40 bytes (0 pending) < 2025-05-20 14:01:27.218 Type: SSH_FXP_STATUS, Size: 40, Number: 2052 < 2025-05-20 14:01:27.218 65,00,00,08,04,00,00,00,00,00,00,00,17,54,68,65,20,6F,70,65,72,61,74,69,6F, < 2025-05-20 14:01:27.218 6E,20,63,6F,6D,70,6C,65,74,65,64,00,00,00,00, . 2025-05-20 14:01:27.218 Discarding reserved response . 2025-05-20 14:01:27.218 Waiting for another 4 bytes . 2025-05-20 14:01:27.218 Looking for incoming data . 2025-05-20 14:01:27.218 Looking for network events . 2025-05-20 14:01:27.359 Detected network event . 2025-05-20 14:01:27.359 Enumerating network events for socket 2120 . 2025-05-20 14:01:27.359 Enumerated 1 network events making 1 cumulative events for socket 2120 . 2025-05-20 14:01:27.359 Handling network read event on socket 2120 with error 0 . 2025-05-20 14:01:27.359 Received 39 bytes (0) . 2025-05-20 14:01:27.359 Read 4 bytes (35 pending) . 2025-05-20 14:01:27.359 Read 35 bytes (0 pending) < 2025-05-20 14:01:27.359 Type: SSH_FXP_STATUS, Size: 35, Number: 2307 < 2025-05-20 14:01:27.359 65,00,00,09,03,00,00,00,03,00,00,00,12,50,65,72,6D,69,73,73,69,6F,6E,20,64, < 2025-05-20 14:01:27.359 65,6E,69,65,64,2E,00,00,00,00, < 2025-05-20 14:01:27.359 Status code: 3, Message: 2307, Server: Permission denied., Language: * 2025-05-20 14:01:27.359 (ETerminal) Permission denied. * 2025-05-20 14:01:27.359 Error code: 3 * 2025-05-20 14:01:27.359 Error message from server: Permission denied. . 2025-05-20 14:01:27.359 Asking user: . 2025-05-20 14:01:27.359 Cannot open remote file '/gets/xx_val.zip'. ("Permission denied. . 2025-05-20 14:01:27.359 Error code: 3 . 2025-05-20 14:01:27.359 Error message from server: Permission denied.")
I found other posts saying "use putty to connect" and "use sudo to change the permissions" or "use a different client" but I have no superuser options on this public-facing shared server, so those are not something I can try.
I have no idea why WinSCP breaks on files randomly - and on those files it says it *should* have access to.
Any ideas?
Thanks
Mark