Topic "Error getting name of current remote directory when using the command open or put"

Author Message
zekor
[View user's profile]

Joined: 2016-09-23
Posts: 6
Location: UK
Hi,

I open a SFTP connection to AWS S3 hosted FTP server and then push files. Both 'open' and 'put' commands gave 'Error getting name of current remote directory.'. Here are some logs:

Code:
C:\tvm_PEXI_Vxxxx\tvm\appli\comcact>winscp
winscp> option batch on
batch           on
reconnecttime   120
winscp> option confirm off
confirm         off
winscp> open sftp://PEON_01:q94sYVh2@cowley.test-raildeliverygroup.com -hostkey="ssh-rsa 2048 7b:39:3e:37:40:f1:1c:f6:2e
:36:f3:32:7d:a1:f9:28"
Searching for host...
Connecting to host...
Authenticating...
Using username "PEON_01".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Error getting name of current remote directory.
Cannot get real path for '.'.
The server does not support the operation.
Error code: 8
Error message from server: java.lang.UnsupportedOperationException: Only class org.atoc.portal.sftp.server.s3.filesystem
.S3FileAttributes is supported
Session started.
Active session: [1] PEON_01@cowley.test-raildeliverygroup.com
winscp> put C:\tvm_PEXI_Vxxxx\tvm\appli\comcact\LNPK040000NNNN_20170208_000431.SDCIPLUS.TEST
Using configured transfer settings different from factory defaults.
Error getting name of current remote directory.
Cannot get real path for '.'.
The server does not support the operation.
Error code: 8
Error message from server: java.lang.UnsupportedOperationException: Only class org.atoc.portal.sftp.server.s3.filesystem
.S3FileAttributes is supported
Error getting name of current remote directory.
Cannot get real path for '.'.
The server does not support the operation.
Error code: 8
Error message from server: java.lang.UnsupportedOperationException: Only class org.atoc.portal.sftp.server.s3.filesystem
.S3FileAttributes is supported
LNPK040000NNNN_20170208_0 |           1 KB |    0.0 KB/s | binary | 100%
Upload of file 'LNPK040000NNNN_20170208_000431.SDCIPLUS.TEST' was successful, but error occurred while setting the permi
ssions and/or timestamp.
If the problem persists, turn off setting permissions or preserving timestamp. Alternatively you can turn on 'Ignore per
mission errors' option.
The server does not support the operation.
Error code: 8
Error message from server: Command SSH_FXP_SETSTAT is unsupported
(A)bort, (R)etry, (S)kip, Ski(p) all: Abort
winscp>
winscp> a
transfer        ascii
winscp>


I was advised that I was trying to read a directory which is prevented.

Can you please advise if directory reading can be disabled when using commands such as open and put?

Kind regard,

Tom
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26318
Location: Prague, Czechia
What SFTP server is that?

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
zekor
[View user's profile]

Joined: 2016-09-23
Posts: 6
Location: UK
martin wrote:
What SFTP server is that?

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.


Many thanks. I attached the full log file here:

Code:
. 2017-02-10 06:56:28.539 --------------------------------------------------------------------------
. 2017-02-10 06:56:28.539 WinSCP Version 5.9.3 (Build 7136) (OS 10.0.14393 - Windows 10 Pro)
. 2017-02-10 06:56:28.539 Configuration: C:\tvm_PEXI_Vxxxx\tvm\appli\comcact\WinSCP.ini
. 2017-02-10 06:56:28.539 Log level: Normal
. 2017-02-10 06:56:28.539 Local account: WIN-975CEF0TKTV\Tom Ko
. 2017-02-10 06:56:28.539 Working directory: C:\tvm_PEXI_Vxxxx\tvm\appli\comcact
. 2017-02-10 06:56:28.539 Process ID: 7412
. 2017-02-10 06:56:28.539 Command-line: "C:\tvm_PEXI_Vxxxx\tvm\appli\comcact\WinSCP.exe" /console=593 /consoleinstance=_4892_142 "/log=winscp.txt"
. 2017-02-10 06:56:28.539 Time zone: Current: GMT+0, Standard: GMT+0 (GMT Standard Time), DST: GMT+1 (GMT Daylight Time), DST Start: 26/03/2017, DST End: 29/10/2017
. 2017-02-10 06:56:28.539 Login time: 10 February 2017 06:56:28
. 2017-02-10 06:56:28.539 --------------------------------------------------------------------------
. 2017-02-10 06:56:28.539 Script: Retrospectively logging previous script records:
> 2017-02-10 06:56:28.539 Script: option batch on
< 2017-02-10 06:56:28.539 Script: batch           on       
< 2017-02-10 06:56:28.539 Script: reconnecttime   120       
> 2017-02-10 06:56:28.539 Script: option confirm off
< 2017-02-10 06:56:28.539 Script: confirm         off       
> 2017-02-10 06:56:28.539 Script: open sftp://######:***@cowley.test-raildeliverygroup.com -hostkey="ssh-rsa 2048 <blanked out>"
. 2017-02-10 06:56:28.539 --------------------------------------------------------------------------
. 2017-02-10 06:56:28.539 Session name: ######@cowley.test-raildeliverygroup.com (Ad-Hoc site)
. 2017-02-10 06:56:28.539 Host name: cowley.test-raildeliverygroup.com (Port: 22)
. 2017-02-10 06:56:28.539 User name: PEON_01 (Password: Yes, Key file: No, Passphrase: No)
. 2017-02-10 06:56:28.539 Tunnel: No
. 2017-02-10 06:56:28.539 Transfer Protocol: SFTP
. 2017-02-10 06:56:28.539 Ping type: Off, Ping interval: 30 sec; Timeout: 15 sec
. 2017-02-10 06:56:28.539 Disable Nagle: No
. 2017-02-10 06:56:28.539 Proxy: None
. 2017-02-10 06:56:28.539 Send buffer: 262144
. 2017-02-10 06:56:28.539 SSH protocol version: 2; Compression: No
. 2017-02-10 06:56:28.539 Bypass authentication: No
. 2017-02-10 06:56:28.539 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2017-02-10 06:56:28.539 Ciphers: aes,chacha20,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2017-02-10 06:56:28.539 KEX: ecdh,dh-gex-sha1,dh-group14-sha1,rsa,WARN,dh-group1-sha1
. 2017-02-10 06:56:28.539 SSH Bugs: Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto
. 2017-02-10 06:56:28.539 Simple channel: Yes
. 2017-02-10 06:56:28.539 Return code variable: Autodetect; Lookup user groups: Auto
. 2017-02-10 06:56:28.539 Shell: default
. 2017-02-10 06:56:28.539 EOL: LF, UTF: Auto
. 2017-02-10 06:56:28.539 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes; Follow directory symlinks: No
. 2017-02-10 06:56:28.539 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2017-02-10 06:56:28.539 SFTP Bugs: Auto,Auto
. 2017-02-10 06:56:28.539 SFTP Server: default
. 2017-02-10 06:56:28.539 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2017-02-10 06:56:28.539 Cache directory changes: Yes, Permanent: Yes
. 2017-02-10 06:56:28.539 Recycle bin: Delete to: No, Overwritten to: No, Bin path:
. 2017-02-10 06:56:28.539 DST mode: Unix
. 2017-02-10 06:56:28.539 --------------------------------------------------------------------------
. 2017-02-10 06:56:28.539 Looking up host "cowley.test-raildeliverygroup.com" for SSH connection
. 2017-02-10 06:56:28.623 Connecting to 52.213.105.75 port 22
. 2017-02-10 06:56:28.656 We claim version: SSH-2.0-WinSCP_release_5.9.3
. 2017-02-10 06:56:28.721 Server version: SSH-2.0-SSHD-CORE-1.2.0
. 2017-02-10 06:56:28.721 We believe remote version has SSH-2 channel request bug
. 2017-02-10 06:56:28.721 Using SSH protocol version 2
. 2017-02-10 06:56:28.724 Have a known host key of type rsa2
. 2017-02-10 06:56:28.741 Doing ECDH key exchange with curve nistp256 and hash SHA-256
. 2017-02-10 06:56:28.941 Host key fingerprint is:
. 2017-02-10 06:56:28.941 ssh-rsa 2048 7b:39:3e:37:40:f1:1c:f6:2e:36:f3:32:7d:a1:f9:28
. 2017-02-10 06:56:28.941 Verifying host key rsa2 <blanked out>  with fingerprint ssh-rsa 2048 <blanked out>
. 2017-02-10 06:56:28.941 Host key matches configured key
. 2017-02-10 06:56:28.941 Initialised AES-256 SDCTR client->server encryption
. 2017-02-10 06:56:28.941 Initialised HMAC-SHA-256 client->server MAC algorithm
. 2017-02-10 06:56:28.956 Initialised AES-256 SDCTR server->client encryption
. 2017-02-10 06:56:28.956 Initialised HMAC-SHA-256 server->client MAC algorithm
! 2017-02-10 06:56:28.972 Using username "PEON_01".
. 2017-02-10 06:56:28.987 Server offered these authentication methods: password,keyboard-interactive,publickey
. 2017-02-10 06:56:28.987 Attempting keyboard-interactive authentication
. 2017-02-10 06:56:29.024 Prompt (keyboard interactive, "SSH server: Password authentication", "Using keyboard-interactive authentication.", "Password: ")
. 2017-02-10 06:56:29.024 Using stored password.
. 2017-02-10 06:56:30.660 Access granted
. 2017-02-10 06:56:30.660 Opening session as main channel
. 2017-02-10 06:56:30.724 Opened main channel
. 2017-02-10 06:56:30.992 Started a shell/command
. 2017-02-10 06:56:30.992 --------------------------------------------------------------------------
. 2017-02-10 06:56:30.992 Using SFTP protocol.
. 2017-02-10 06:56:30.992 Doing startup conversation with host.
> 2017-02-10 06:56:30.992 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2017-02-10 06:56:31.029 Type: SSH_FXP_VERSION, Size: 545, Number: -1
. 2017-02-10 06:56:31.029 SFTP version 6 negotiated.
. 2017-02-10 06:56:31.029 SFTP versions supported by the server: 3,4,5,6
. 2017-02-10 06:56:31.029 Server requests EOL sequence "\n".
. 2017-02-10 06:56:31.029 Server software: sshd-core 1.2.0 (0) by org.apache.sshd
. 2017-02-10 06:56:31.029 Unknown server extension fsync@openssh.com="1"
. 2017-02-10 06:56:31.029 Supports hardlink@openssh.com extension version "1"
. 2017-02-10 06:56:31.029 Unknown server extension acl-supported=0x0000000F
. 2017-02-10 06:56:31.029 Server support information (supported):
. 2017-02-10 06:56:31.029   Attribute mask: 2BD, Attribute bits: 0, Open flags: 3F
. 2017-02-10 06:56:31.029   Access mask: 0, Open block vector: 0, Block vector: 0, Max read size: 0
. 2017-02-10 06:56:31.029   Attribute extensions (0)
. 2017-02-10 06:56:31.029   Extensions (8)
. 2017-02-10 06:56:31.029     version-select
. 2017-02-10 06:56:31.029     copy-file
. 2017-02-10 06:56:31.029     md5-hash
. 2017-02-10 06:56:31.029     md5-hash-handle
. 2017-02-10 06:56:31.029     check-file-handle
. 2017-02-10 06:56:31.029     check-file-name
. 2017-02-10 06:56:31.029     copy-data
. 2017-02-10 06:56:31.029     space-available
. 2017-02-10 06:56:31.029 Server support information (supported2):
. 2017-02-10 06:56:31.029   Attribute mask: 2BD, Attribute bits: 0, Open flags: F
. 2017-02-10 06:56:31.029   Access mask: 0, Open block vector: 0, Block vector: 0, Max read size: 0
. 2017-02-10 06:56:31.029   Attribute extensions (0)
. 2017-02-10 06:56:31.029   Extensions (8)
. 2017-02-10 06:56:31.029     version-select
. 2017-02-10 06:56:31.029     copy-file
. 2017-02-10 06:56:31.029     md5-hash
. 2017-02-10 06:56:31.029     md5-hash-handle
. 2017-02-10 06:56:31.029     check-file-handle
. 2017-02-10 06:56:31.029     check-file-name
. 2017-02-10 06:56:31.029     copy-data
. 2017-02-10 06:56:31.029     space-available
. 2017-02-10 06:56:31.029 We will use UTF-8 strings as it is mandatory with SFTP version 4 and newer
. 2017-02-10 06:56:31.029 Getting current directory name.
. 2017-02-10 06:56:31.029 Getting real path for '.'
> 2017-02-10 06:56:31.029 Type: SSH_FXP_REALPATH, Size: 11, Number: 16
< 2017-02-10 06:56:31.060 Type: SSH_FXP_STATUS, Size: 140, Number: 16
< 2017-02-10 06:56:31.060 Status code: 8, Message: 16, Server: java.lang.UnsupportedOperationException: Only class org.atoc.portal.sftp.server.s3.filesystem.S3FileAttributes is supported, Language: 
* 2017-02-10 06:56:31.060 (ECommand) Error getting name of current remote directory.
* 2017-02-10 06:56:31.060 Cannot get real path for '.'.
* 2017-02-10 06:56:31.060 The server does not support the operation.
* 2017-02-10 06:56:31.060 Error code: 8
* 2017-02-10 06:56:31.060 Error message from server: java.lang.UnsupportedOperationException: Only class org.atoc.portal.sftp.server.s3.filesystem.S3FileAttributes is supported
. 2017-02-10 06:56:31.060 Startup conversation with host finished.
< 2017-02-10 06:56:31.060 Script: Active session: [1] PEON_01@cowley.test-raildeliverygroup.com
. 2017-02-10 06:56:31.060 Script: Failed
> 2017-02-10 06:56:42.345 Script: put -resumesupport=off -nopreservetime -nopermissions LNPK040000NNNN_20170208_000433.SDCIPLUS.TEST
< 2017-02-10 06:56:42.345 Script: Using configured transfer settings different from factory defaults.
. 2017-02-10 06:56:42.346 Getting current directory name.
. 2017-02-10 06:56:42.347 Getting real path for '.'
> 2017-02-10 06:56:42.347 Type: SSH_FXP_REALPATH, Size: 11, Number: 272
< 2017-02-10 06:56:42.364 Type: SSH_FXP_STATUS, Size: 140, Number: 272
< 2017-02-10 06:56:42.364 Status code: 8, Message: 272, Server: java.lang.UnsupportedOperationException: Only class org.atoc.portal.sftp.server.s3.filesystem.S3FileAttributes is supported, Language: 
* 2017-02-10 06:56:42.364 (ECommand) Error getting name of current remote directory.
* 2017-02-10 06:56:42.364 Cannot get real path for '.'.
* 2017-02-10 06:56:42.364 The server does not support the operation.
* 2017-02-10 06:56:42.364 Error code: 8
* 2017-02-10 06:56:42.364 Error message from server: java.lang.UnsupportedOperationException: Only class org.atoc.portal.sftp.server.s3.filesystem.S3FileAttributes is supported
< 2017-02-10 06:56:42.364 Script: Error getting name of current remote directory.
< 2017-02-10 06:56:42.364 Cannot get real path for '.'.
< 2017-02-10 06:56:42.364 The server does not support the operation.
< 2017-02-10 06:56:42.364 Error code: 8
< 2017-02-10 06:56:42.364 Error message from server: java.lang.UnsupportedOperationException: Only class org.atoc.portal.sftp.server.s3.filesystem.S3FileAttributes is supported
. 2017-02-10 06:56:42.364 Copying 1 files/directories to remote directory ""
. 2017-02-10 06:56:42.364   PrTime: No; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: N (102400); CalcS: No; Mask:
. 2017-02-10 06:56:42.364   TM: M; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; InclM: ; ResumeL: 0
. 2017-02-10 06:56:42.364   AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2017-02-10 06:56:42.364 Getting current directory name.
. 2017-02-10 06:56:42.364 Getting real path for '.'
> 2017-02-10 06:56:42.364 Type: SSH_FXP_REALPATH, Size: 11, Number: 528
< 2017-02-10 06:56:42.380 Type: SSH_FXP_STATUS, Size: 140, Number: 528
< 2017-02-10 06:56:42.380 Status code: 8, Message: 528, Server: java.lang.UnsupportedOperationException: Only class org.atoc.portal.sftp.server.s3.filesystem.S3FileAttributes is supported, Language: 
* 2017-02-10 06:56:42.380 (ECommand) Error getting name of current remote directory.
* 2017-02-10 06:56:42.380 Cannot get real path for '.'.
* 2017-02-10 06:56:42.380 The server does not support the operation.
* 2017-02-10 06:56:42.380 Error code: 8
* 2017-02-10 06:56:42.380 Error message from server: java.lang.UnsupportedOperationException: Only class org.atoc.portal.sftp.server.s3.filesystem.S3FileAttributes is supported
< 2017-02-10 06:56:42.380 Script: Error getting name of current remote directory.
< 2017-02-10 06:56:42.380 Cannot get real path for '.'.
< 2017-02-10 06:56:42.380 The server does not support the operation.
< 2017-02-10 06:56:42.380 Error code: 8
< 2017-02-10 06:56:42.380 Error message from server: java.lang.UnsupportedOperationException: Only class org.atoc.portal.sftp.server.s3.filesystem.S3FileAttributes is supported
. 2017-02-10 06:56:42.380 File: 'LNPK040000NNNN_20170208_000433.SDCIPLUS.TEST' [2017-02-08T07:04:44.992Z] [1026]
. 2017-02-10 06:56:42.395 Copying "LNPK040000NNNN_20170208_000433.SDCIPLUS.TEST" to remote directory started.
. 2017-02-10 06:56:42.395 Binary transfer mode selected.
. 2017-02-10 06:56:42.395 Opening remote file.
> 2017-02-10 06:56:42.395 Type: SSH_FXP_OPEN, Size: 66, Number: 771
< 2017-02-10 06:56:42.527 Type: SSH_FXP_HANDLE, Size: 41, Number: 771
> 2017-02-10 06:56:42.527 Type: SSH_FXP_WRITE, Size: 1079, Number: 1286
> 2017-02-10 06:56:42.527 Type: SSH_FXP_CLOSE, Size: 41, Number: 1540
< 2017-02-10 06:56:42.548 Type: SSH_FXP_STATUS, Size: 17, Number: 1286
< 2017-02-10 06:56:43.151 Type: SSH_FXP_STATUS, Size: 17, Number: 1540
< 2017-02-10 06:56:43.151 Status code: 0
. 2017-02-10 06:56:43.151 Transfer done: 'LNPK040000NNNN_20170208_000433.SDCIPLUS.TEST' [1026]
. 2017-02-10 06:56:43.151 Script: Failed
> 2017-02-10 06:56:52.677 Script: exit
. 2017-02-10 06:56:52.677 Script: Exit code: 1
. 2017-02-10 06:56:52.677 Closing connection.
. 2017-02-10 06:56:52.677 Sending special code: 12
. 2017-02-10 06:56:52.677 Sent EOF message
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26318
Location: Prague, Czechia
Looks like some bug or misconfiguration of the SFTP server.

I'd try forcing SFTP version 3 using:

open -rawsettings SFTPMaxVersion=3 sftp://...

See https://winscp.net/eng/docs/rawsettings
zekor
[View user's profile]

Joined: 2016-09-23
Posts: 6
Location: UK
martin wrote:
Looks like some bug or misconfiguration of the SFTP server.

I'd try forcing SFTP version 3 using:

open -rawsettings SFTPMaxVersion=3 sftp://...

See https://winscp.net/eng/docs/rawsettings


This solves the error messages. Many thanks!

Tom
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License