Connecting via a batch file to a S3 compatible host fails although the site via UI works well
Hi,
I added a new S3 compatible site. From the WinSCP UI – I can access the site. I then created a batch-file by copying the text from the batch-file format of the "Generate Session URL/Code" options. Still – when trying to run the batch-file – I receive an "Access denied" error. The log file is following. What is wrong?
I added a new S3 compatible site. From the WinSCP UI – I can access the site. I then created a batch-file by copying the text from the batch-file format of the "Generate Session URL/Code" options. Still – when trying to run the batch-file – I receive an "Access denied" error. The log file is following. What is wrong?
. 2026-05-04 05:47:00.774 -------------------------------------------------------------------------- . 2026-05-04 05:47:00.774 WinSCP Version 5.19.5 (Build 11933 2021-11-25) (OS 10.0.20348 - Windows Server 2022 Standard) . 2026-05-04 05:47:00.774 Configuration: nul . 2026-05-04 05:47:00.774 Log level: Normal . 2026-05-04 05:47:00.774 Local account: SHIFMAN\accadia . 2026-05-04 05:47:00.774 Working directory: C:\Accadia\TBD\AutoTasks . 2026-05-04 05:47:00.774 Process ID: 6092 . 2026-05-04 05:47:00.790 Ancestor processes: WinSCP, cmd, explorer, ... . 2026-05-04 05:47:00.790 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" /console=5.19.5 /consoleinstance=_10964_363 "/log=C:\Temp\WinSCP.log" "/ini=nul" "/command" "open s3://7080e6bdab5b3442b8dc273265e82f9d:***@e6880b282826f37572bc40868401a011.r2.cloudflarestorage.com/" "Your command 1" "Your command 2" "exit" . 2026-05-04 05:47:00.790 Time zone: Current: GMT-7, Standard: GMT-8 (Pacific Standard Time), DST: GMT-7 (Pacific Daylight Time), DST Start: 03/08/2026, DST End: 11/01/2026 . 2026-05-04 05:47:00.790 Login time: 05/04/2026 05:47:00 . 2026-05-04 05:47:00.790 -------------------------------------------------------------------------- . 2026-05-04 05:47:00.790 Script: Retrospectively logging previous script records: > 2026-05-04 05:47:00.790 Script: open s3://7080e6bdab5b3442b8dc273265e82f9d:***@e6880b282826f37572bc40868401a011.r2.cloudflarestorage.com/ . 2026-05-04 05:47:00.790 -------------------------------------------------------------------------- . 2026-05-04 05:47:00.790 Session name: 7080e6bdab5b3442b8dc273265e82f9d@e6880b282826f37572bc40868401a011.r2.cloudflarestorage.com (Ad-Hoc site) . 2026-05-04 05:47:00.790 Host name: e6880b282826f37572bc40868401a011.r2.cloudflarestorage.com (Port: 443) . 2026-05-04 05:47:00.790 User name: 7080e6bdab5b3442b8dc273265e82f9d (Password: Yes, Key file: No, Passphrase: No) . 2026-05-04 05:47:00.790 Transfer Protocol: S3 . 2026-05-04 05:47:00.790 Proxy: None . 2026-05-04 05:47:00.790 HTTPS: Yes . 2026-05-04 05:47:00.790 S3: URL Style: Virtual Host . 2026-05-04 05:47:00.790 TLS/SSL versions: TLSv1.0-TLSv1.3 . 2026-05-04 05:47:00.790 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes . 2026-05-04 05:47:00.790 Cache directory changes: Yes, Permanent: Yes . 2026-05-04 05:47:00.790 Recycle bin: Delete to: No, Overwritten to: No, Bin path: . 2026-05-04 05:47:00.790 -------------------------------------------------------------------------- < 2026-05-04 05:47:00.790 Script: Connecting to host... . 2026-05-04 05:47:00.790 Trying to open directory "/". . 2026-05-04 05:47:00.790 HTTP session to https://e6880b282826f37572bc40868401a011.r2.cloudflarestorage.com:443 begins. . 2026-05-04 05:47:00.790 ssl: SNI enabled by default. . 2026-05-04 05:47:00.790 Sending request headers: . 2026-05-04 05:47:00.790 GET /?max-keys=1 HTTP/1.1 . 2026-05-04 05:47:00.790 User-Agent: WinSCP/5.19.5 neon/0.31.2 . 2026-05-04 05:47:00.790 Keep-Alive: . 2026-05-04 05:47:00.790 Connection: TE, Keep-Alive . 2026-05-04 05:47:00.790 TE: trailers . 2026-05-04 05:47:00.790 Host: e6880b282826f37572bc40868401a011.r2.cloudflarestorage.com . 2026-05-04 05:47:00.790 Authorization: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx . 2026-05-04 05:47:00.790 x-amz-date: 20260504T124700Z . 2026-05-04 05:47:00.790 x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 . 2026-05-04 05:47:00.790 Sending request-line and headers: . 2026-05-04 05:47:00.790 Doing DNS lookup on e6880b282826f37572bc40868401a011.r2.cloudflarestorage.com... . 2026-05-04 05:47:00.805 req: Connecting to 172.64.66.1:443 . 2026-05-04 05:47:00.805 Doing SSL negotiation. . 2026-05-04 05:47:00.821 Identity match for 'e6880b282826f37572bc40868401a011.r2.cloudflarestorage.com': good . 2026-05-04 05:47:00.821 Verifying certificate for "r2.cloudflarestorage.com" with fingerprint a6:ae:c5:20:82:bd:cb:34:cb:72:ad:6e:fe:fc:55:8b:71:aa:85:ba:64:05:de:f7:1e:4d:a5:e2:72:83:6f:c2 and 08 failures . 2026-05-04 05:47:00.868 Certificate verified against Windows certificate store . 2026-05-04 05:47:00.868 Using TLSv1.3, cipher TLSv1.3: TLS_AES_256_GCM_SHA384, . 2026-05-04 05:47:00.868 Request sent; retry is 0. . 2026-05-04 05:47:00.884 [status-line] < HTTP/1.1 403 Forbidden . 2026-05-04 05:47:00.884 Header Name: [date], Value: [Mon, 04 May 2026 12:46:51 GMT] . 2026-05-04 05:47:00.884 Header Name: [content-type], Value: [application/xml] . 2026-05-04 05:47:00.884 Header Name: [content-length], Value: [110] . 2026-05-04 05:47:00.884 Header Name: [connection], Value: [keep-alive] . 2026-05-04 05:47:00.884 Header Name: [server], Value: [cloudflare] . 2026-05-04 05:47:00.884 Header Name: [cf-ray], Value: [9f679c51b8828e4e-TLV] . 2026-05-04 05:47:00.884 End of headers. . 2026-05-04 05:47:00.884 Request ends, status 403 class 4xx, error line: . 2026-05-04 05:47:00.884 403 Forbidden . 2026-05-04 05:47:00.884 Access Denied < 2026-05-04 05:47:00.884 <?xml version="1.0" encoding="UTF-8"?><Error><Code>AccessDenied</Code><Message>Access Denied</Message></Error> . 2026-05-04 05:47:00.884 Request ends. . 2026-05-04 05:47:00.884 sess: Destroying session. . 2026-05-04 05:47:00.884 sess: Closing connection. . 2026-05-04 05:47:00.884 sess: Connection closed. < 2026-05-04 05:47:00.884 Script: Access denied. < 2026-05-04 05:47:00.884 Access Denied < 2026-05-04 05:47:00.884 Connection failed.