Re: RE: VBA Scripting Issue with Session Logging - Access Denied on Log File (But Log Is Created!)
Please post complete debug and session log as private attachments.
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
'Enable session logging
'rEF: https://winscp.net/eng/docs/logging
'REF: https://winscp.net/eng/docs/library_session#sessionlogpath
If SFTP_Session_Log_Path <> "" Then
mySession.SessionLogPath = SFTP_Session_Log_Path
mySession.DebugLogPath = SFTP_Session_Log_Path
Else 'default to no logging
mySession.SessionLogPath = ""
mySession.DebugLogPath = ""
End If
[2024-06-21 13:26:18.381] [0001] Output: [winscp> open "sftp://<login>:<host>:2222" -hostkey="ssh-rsa 4096 <fingerprint>" -privatekey="H:\3-CLIENTS\<path>client_4096.ppk" -timeout=15]
[2024-06-21 13:26:18.381] [0001] Output: [Error occurred during logging. It's been turned off.]
[2024-06-21 13:26:18.381] [0001] Output: [Can't open log file 'H:\3-CLIENTS\<log path>'.
]
[2024-06-21 13:26:18.381] [0001] Output: [System Error. Code: 5.
]
[2024-06-21 13:26:18.381] [0001] Output: [Access is denied]
[2024-06-21 13:26:18.381] [0001] Output: [Searching for host...]
[2024-06-21 13:26:18.381] [0001] Output: [Connecting to host...]
[2024-06-21 13:26:18.381] [0001] Output: [Authenticating...]
[2024-06-21 13:26:18.381] [0001] Output: [Using username "<user id>".]
[2024-06-21 13:26:18.381] [0001] Output: [Authenticating with public key "<public key>".]
[2024-06-21 13:26:18.442] [0001] Waiting for log update and dispatching events for 100
[2024-06-21 13:26:18.551] [0001] Waiting for log update and dispatching events for 200
[2024-06-21 13:26:18.756] [0001] Waiting for log update and dispatching events for 400
[2024-06-21 13:26:19.165] [0001] Waiting for log update and dispatching events for 800
transferResult.Check