Upload file fails when account has no LIST permission

Advertisement

menezesj
Joined:
Posts:
3
Location:
United States

Upload file fails when account has no LIST permission

Hello,

I have been encountering an issue with WINSCP since our provider has changed their FTP server to no longer allow LIST for our accounts. I have tried with both WinSCP.com and WinSCP GUI, and run into issues.
Error Messages:
(GUI)
---------------------------
Error
---------------------------
Error listing directory '/'.
---------------------------
Could not retrieve directory listing
Access is denied. 
---------------------------
OK   Help   
---------------------------
Through an interactive command line, I get the error, but am allowed to retry which will usually work within the next 3 retries.:
winscp> put e:\ftpfiles\VendorName\sw_user_import.csv sw_user_import.csv
e:\...\sw_user_import.csv |          16 KB |  205.1 KB/s | binary |   9%
Error transferring file 'e:\ftpfiles\VendorName\sw_user_import.csv'.
Using TLSv1.2, cipher TLSv1/SSLv3: ECDHE-RSA-AES256-SHA384, 2048 bit RSA, ECDHE-
RSA-AES256-SHA384 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AES(256)  Mac=SHA384

Copying files to remote side failed.
The specified network name is no longer available.
(A)bort, (R)etry, (S)kip, Ski(p) all: Retry
e:\...\sw_user_import.csv |          16 KB |  114.3 KB/s | binary |   9%
Error transferring file 'e:\ftpfiles\VendorName\sw_user_import.csv'.
Copying files to remote side failed.
Access is denied.
(A)bort, (R)etry, (S)kip, Ski(p) all: Retry
e:\...\sw_user_import.csv |         169 KB |   93.8 KB/s | binary | 100%
winscp> exit

When running through a script, it fails automatically:
c:\Program Files (x86)\WinSCP>winscp.com /script=E:\ftpfiles\VendorName\SWFTP.txt
Connecting to swaftp1.VendorName.com ...
TLS connection established. Waiting for welcome message...
Connected
Starting the session...
Session started.
Active session: [1] UserNameABC@swaftp1.VendorName.com
batch           continue
e:\...\sw_user_import.csv |            0 B |    0.0 KB/s | binary |   0%
Error transferring file 'e:\ftpfiles\VendorName\sw_user_import.csv'.
Using TLSv1.2, cipher TLSv1/SSLv3: ECDHE-RSA-AES256-SHA384, 2048 bit RSA, ECDHE-
RSA-AES256-SHA384 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AES(256)  Mac=SHA384

Copying files to remote side failed.
The specified network name is no longer available.
(A)bort, (R)etry, (S)kip, Ski(p) all: Skip

c:\Program Files (x86)\WinSCP>

When I upload using a different client (FileZilla) using the same account, credentials and file, I am able to upload the file successfully (although it does complain about not being able to LIST)

Here is a detailed log from WinSCP:
. 2018-03-15 11:03:15.060 --------------------------------------------------------------------------
. 2018-03-15 11:03:15.060 WinSCP Version 5.13 (Build 8172) (OS 6.3.9600 - Windows Server 2012 R2 Standard)
. 2018-03-15 11:03:15.060 Configuration: HKCU\Software\Martin Prikryl\WinSCP 2\
. 2018-03-15 11:03:15.060 Log level: Normal, Logging passwords
. 2018-03-15 11:03:15.060 Local account: CVUSD\MyUser
. 2018-03-15 11:03:15.060 Working directory: c:\Program Files (x86)\WinSCP
. 2018-03-15 11:03:15.060 Process ID: 4916
. 2018-03-15 11:03:15.060 Command-line: "c:\Program Files (x86)\WinSCP\WinSCP.exe" /console=5.13.0 /consoleinstance=_6328_55 "/log=e:\ftpfiles\VendorName\log.txt" "/loglevel=*" 
. 2018-03-15 11:03:15.060 Time zone: Current: GMT-7, Standard: GMT-8 (Pacific Standard Time), DST: GMT-7 (Pacific Daylight Time), DST Start: 3/11/2018, DST End: 11/4/2018
. 2018-03-15 11:03:15.060 Login time: Thursday, March 15, 2018 11:03:15 AM
. 2018-03-15 11:03:15.060 --------------------------------------------------------------------------
. 2018-03-15 11:03:15.060 Script: Retrospectively logging previous script records:
> 2018-03-15 11:03:15.060 Script: open ftps://UserNameABC:Pass123@swaftp1.VendorName.com:21/ -explicit
. 2018-03-15 11:03:15.060 --------------------------------------------------------------------------
. 2018-03-15 11:03:15.060 Session name: UserNameABC@swaftp1.VendorName.com (Ad-Hoc site)
. 2018-03-15 11:03:15.060 Host name: swaftp1.VendorName.com (Port: 21)
. 2018-03-15 11:03:15.060 User name: UserNameABC (Password: Pass123, Key file: No, Passphrase: No)
. 2018-03-15 11:03:15.060 Transfer Protocol: FTP
. 2018-03-15 11:03:15.060 Ping type: Dummy, Ping interval: 30 sec; Timeout: 15 sec
. 2018-03-15 11:03:15.060 Disable Nagle: No
. 2018-03-15 11:03:15.060 Proxy: None
. 2018-03-15 11:03:15.060 Send buffer: 262144
. 2018-03-15 11:03:15.060 UTF: Auto
. 2018-03-15 11:03:15.060 FTPS: Explicit TLS/SSL [Client certificate: No]
. 2018-03-15 11:03:15.060 FTP: Passive: Yes [Force IP: Auto]; MLSD: Auto [List all: Auto]; HOST: Auto
. 2018-03-15 11:03:15.060 Session reuse: Yes
. 2018-03-15 11:03:15.060 TLS/SSL versions: TLSv1.0-TLSv1.2
. 2018-03-15 11:03:15.060 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2018-03-15 11:03:15.060 Cache directory changes: Yes, Permanent: Yes
. 2018-03-15 11:03:15.060 Recycle bin: Delete to: No, Overwritten to: No, Bin path: 
. 2018-03-15 11:03:15.060 Timezone offset: 0h 0m
. 2018-03-15 11:03:15.060 --------------------------------------------------------------------------
. 2018-03-15 11:03:15.061 Connecting to swaftp1.VendorName.com ...
. 2018-03-15 11:03:15.065 Connected with swaftp1.VendorName.com, negotiating TLS connection...
< 2018-03-15 11:03:15.211 220 Microsoft FTP Service
> 2018-03-15 11:03:15.211 AUTH TLS
< 2018-03-15 11:03:15.284 234 AUTH command ok. Expecting TLS Negotiation.
. 2018-03-15 11:03:15.557 Verifying certificate for "VendorName, Inc." with fingerprint 9b:47:ac:eb:4f:c2:a6:91:ea:f6:f3:51:39:1d:e0:5c:72:f1:25:cb and 20 failures
. 2018-03-15 11:03:15.557 Certificate common name "*.VendorName.com" matches hostname
. 2018-03-15 11:03:15.590 Certificate verified against Windows certificate store
. 2018-03-15 11:03:15.591 Using TLSv1.2, cipher TLSv1/SSLv3: ECDHE-RSA-AES256-SHA384, 2048 bit RSA, ECDHE-RSA-AES256-SHA384 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AES(256)  Mac=SHA384
. 2018-03-15 11:03:15.591 TLS connection established. Waiting for welcome message...
> 2018-03-15 11:03:15.591 USER UserNameABC
< 2018-03-15 11:03:15.664 331 Password required
> 2018-03-15 11:03:15.664 PASS Pass123
< 2018-03-15 11:03:15.737 230 User logged in.
> 2018-03-15 11:03:15.737 SYST
. 2018-03-15 11:03:15.810 The server is probably running Windows, assuming that directory listing timestamps are affected by DST.
< 2018-03-15 11:03:15.810 215 Windows_NT
> 2018-03-15 11:03:15.810 FEAT
< 2018-03-15 11:03:15.883 211-Extended features supported:
< 2018-03-15 11:03:15.884  LANG EN*
< 2018-03-15 11:03:15.884  UTF8
< 2018-03-15 11:03:15.884  AUTH TLS;TLS-C;SSL;TLS-P;
< 2018-03-15 11:03:15.884  PBSZ
< 2018-03-15 11:03:15.884  PROT C;P;
< 2018-03-15 11:03:15.884  CCC
< 2018-03-15 11:03:15.884  HOST
< 2018-03-15 11:03:15.884  SIZE
< 2018-03-15 11:03:15.885  MDTM
< 2018-03-15 11:03:15.885  REST STREAM
< 2018-03-15 11:03:15.885 211 END
> 2018-03-15 11:03:15.885 OPTS UTF8 ON
< 2018-03-15 11:03:15.958 200 OPTS UTF8 command successful - UTF8 encoding now ON.
> 2018-03-15 11:03:15.958 PBSZ 0
< 2018-03-15 11:03:16.031 200 PBSZ command successful.
> 2018-03-15 11:03:16.031 PROT P
< 2018-03-15 11:03:16.104 200 PROT command successful.
. 2018-03-15 11:03:16.105 Connected
. 2018-03-15 11:03:16.105 --------------------------------------------------------------------------
. 2018-03-15 11:03:16.105 Using FTP protocol.
. 2018-03-15 11:03:16.105 Doing startup conversation with host.
> 2018-03-15 11:03:16.105 PWD
< 2018-03-15 11:03:16.178 257 "/" is current directory.
. 2018-03-15 11:03:16.178 Getting current directory name.
. 2018-03-15 11:03:16.178 Startup conversation with host finished.
< 2018-03-15 11:03:16.179 Script: Active session: [1] UserNameABC@swaftp1.VendorName.com
> 2018-03-15 11:03:20.308 Script: put e:\ftpfiles\VendorName\sw_user_import.csv
. 2018-03-15 11:03:20.309 Copying 1 files/directories to remote directory "/" - total size: 173,989
. 2018-03-15 11:03:20.309   PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: No; Mask: 
. 2018-03-15 11:03:20.309   TM: B; ClAr: No; RemEOF: No; RemBOM: No; CPS: 0; NewerOnly: No; InclM: ; ResumeL: 0
. 2018-03-15 11:03:20.309   AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2018-03-15 11:03:20.309 Retrieving listing to detect timezone difference
. 2018-03-15 11:03:20.309 Retrieving directory listing...
> 2018-03-15 11:03:20.310 TYPE A
< 2018-03-15 11:03:20.383 200 Type set to A.
> 2018-03-15 11:03:20.383 PASV
< 2018-03-15 11:03:20.457 227 Entering Passive Mode (52,206,191,229,214,216).
> 2018-03-15 11:03:20.457 LIST
. 2018-03-15 11:03:20.457 Connecting to 52.206.191.229:55000 ...
. 2018-03-15 11:03:20.602 Data connection closed
. 2018-03-15 11:03:20.603 <Empty directory listing>
< 2018-03-15 11:03:20.603 550 Access is denied. 
. 2018-03-15 11:03:20.603 Could not retrieve directory listing
. 2018-03-15 11:03:20.603 File: 'e:\ftpfiles\VendorName\sw_user_import.csv' [2018-03-15T06:50:01.264Z] [173989]
. 2018-03-15 11:03:20.604 Copying "e:\ftpfiles\VendorName\sw_user_import.csv" to remote directory started.
. 2018-03-15 11:03:20.604 Binary transfer mode selected.
. 2018-03-15 11:03:20.604 Starting upload of e:\ftpfiles\VendorName\sw_user_import.csv
> 2018-03-15 11:03:20.604 TYPE A
< 2018-03-15 11:03:20.677 200 Type set to A.
> 2018-03-15 11:03:20.677 PASV
< 2018-03-15 11:03:20.750 227 Entering Passive Mode (52,206,191,229,214,223).
> 2018-03-15 11:03:20.750 LIST
. 2018-03-15 11:03:20.750 Connecting to 52.206.191.229:55007 ...
. 2018-03-15 11:03:20.822 Data connection closed
. 2018-03-15 11:03:20.822 <Empty directory listing>
< 2018-03-15 11:03:20.823 550 Access is denied. 
> 2018-03-15 11:03:20.823 SIZE sw_user_import.csv
< 2018-03-15 11:03:20.896 550 Access is denied. 
> 2018-03-15 11:03:20.896 MDTM sw_user_import.csv
< 2018-03-15 11:03:20.970 213 20180315065001
> 2018-03-15 11:03:20.970 TYPE I
< 2018-03-15 11:03:21.043 200 Type set to I.
> 2018-03-15 11:03:21.043 PASV
< 2018-03-15 11:03:21.116 227 Entering Passive Mode (52,206,191,229,214,220).
> 2018-03-15 11:03:21.116 STOR sw_user_import.csv
. 2018-03-15 11:03:21.116 Connecting to 52.206.191.229:55004 ...
< 2018-03-15 11:03:21.190 150 Opening BINARY mode data connection.
. 2018-03-15 11:03:21.262 Session ID reused
. 2018-03-15 11:03:21.263 Using TLSv1.2, cipher TLSv1/SSLv3: ECDHE-RSA-AES256-SHA384, 2048 bit RSA, ECDHE-RSA-AES256-SHA384 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AES(256)  Mac=SHA384
. 2018-03-15 11:03:21.263 TLS connection established
. 2018-03-15 11:03:21.263 Data connection closed
< 2018-03-15 11:03:21.336 550 The specified network name is no longer available. 
. 2018-03-15 11:03:21.336 Copying files to remote side failed.
* 2018-03-15 11:03:21.336 (ExtException) **Using TLSv1.2, cipher TLSv1/SSLv3: ECDHE-RSA-AES256-SHA384, 2048 bit RSA, ECDHE-RSA-AES256-SHA384 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AES(256)  Mac=SHA384
* 2018-03-15 11:03:21.336 **
* 2018-03-15 11:03:21.336 Copying files to remote side failed.
* 2018-03-15 11:03:21.336 The specified network name is no longer available. 
. 2018-03-15 11:03:21.336 Asking user:
. 2018-03-15 11:03:21.336 Error transferring file 'e:\ftpfiles\VendorName\sw_user_import.csv'. ("Using TLSv1.2, cipher TLSv1/SSLv3: ECDHE-RSA-AES256-SHA384, 2048 bit RSA, ECDHE-RSA-AES256-SHA384 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AES(256)  Mac=SHA384
. 2018-03-15 11:03:21.336 ","Copying files to remote side failed.","The specified network name is no longer available. ")
< 2018-03-15 11:03:21.336 Script: Error transferring file 'e:\ftpfiles\VendorName\sw_user_import.csv'.
< 2018-03-15 11:03:21.336 Script: Using TLSv1.2, cipher TLSv1/SSLv3: ECDHE-RSA-AES256-SHA384, 2048 bit RSA, ECDHE-RSA-AES256-SHA384 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AES(256)  Mac=SHA384
< 2018-03-15 11:03:21.336 

< 2018-03-15 11:03:21.336 Copying files to remote side failed.

< 2018-03-15 11:03:21.336 The specified network name is no longer available.
. 2018-03-15 11:03:23.532 Starting upload of e:\ftpfiles\VendorName\sw_user_import.csv
> 2018-03-15 11:03:23.532 TYPE A
< 2018-03-15 11:03:23.605 200 Type set to A.
> 2018-03-15 11:03:23.605 PASV
< 2018-03-15 11:03:23.678 227 Entering Passive Mode (52,206,191,229,214,224).
> 2018-03-15 11:03:23.678 LIST
. 2018-03-15 11:03:23.678 Connecting to 52.206.191.229:55008 ...
. 2018-03-15 11:03:23.749 Data connection closed
. 2018-03-15 11:03:23.750 <Empty directory listing>
< 2018-03-15 11:03:23.751 550 Access is denied. 
> 2018-03-15 11:03:23.751 SIZE sw_user_import.csv
< 2018-03-15 11:03:23.824 550 Access is denied. 
> 2018-03-15 11:03:23.824 MDTM sw_user_import.csv
< 2018-03-15 11:03:23.897 550 The system cannot find the file specified. 
> 2018-03-15 11:03:23.898 TYPE I
< 2018-03-15 11:03:23.970 200 Type set to I.
> 2018-03-15 11:03:23.971 PASV
< 2018-03-15 11:03:24.043 227 Entering Passive Mode (52,206,191,229,214,219).
> 2018-03-15 11:03:24.044 STOR sw_user_import.csv
. 2018-03-15 11:03:24.044 Connecting to 52.206.191.229:55003 ...
< 2018-03-15 11:03:24.117 150 Opening BINARY mode data connection.
. 2018-03-15 11:03:24.276 Using TLSv1.2, cipher TLSv1/SSLv3: ECDHE-RSA-AES256-SHA384, 2048 bit RSA, ECDHE-RSA-AES256-SHA384 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AES(256)  Mac=SHA384
. 2018-03-15 11:03:24.276 TLS connection established
< 2018-03-15 11:03:24.861 226 Transfer complete.
> 2018-03-15 11:03:24.861 MDTM 20180315065001 sw_user_import.csv
< 2018-03-15 11:03:24.934 213 20180315065001
. 2018-03-15 11:03:24.934 Upload successful
. 2018-03-15 11:03:24.934 Transfer done: 'e:\ftpfiles\VendorName\sw_user_import.csv' => '/sw_user_import.csv' [173989]
. 2018-03-15 11:03:24.934 Copying finished: Transferred: 173,989, Elapsed: 0:00:04, CPS: 111,388/s
> 2018-03-15 11:03:35.542 Script: exit
. 2018-03-15 11:03:35.542 Script: Exit code: 0
. 2018-03-15 11:03:35.545 Disconnected from server

And the comparable log from FileZilla:
Status:   Resolving address of swaftp1.VendorName.com
Status:   Connecting to 52.206.191.229:21...
Status:   Connection established, waiting for welcome message...
Response:   220 Microsoft FTP Service
Command:   AUTH TLS
Response:   234 AUTH command ok. Expecting TLS Negotiation.
Status:   Initializing TLS...
Status:   Verifying certificate...
Status:   TLS connection established.
Command:   USER CA01902277
Response:   331 Password required
Command:   PASS ****************
Response:   230 User logged in.
Command:   OPTS UTF8 ON
Response:   200 OPTS UTF8 command successful - UTF8 encoding now ON.
Command:   PBSZ 0
Response:   200 PBSZ command successful.
Command:   PROT P
Response:   200 PROT command successful.
Status:   Logged in
Status:   Starting upload of E:\FTPFiles\VendorName\sw_user_import.csv
Command:   CWD /
Response:   250 CWD command successful.
Command:   PWD
Response:   257 "/" is current directory.
Status:   Retrieving directory listing of "/"...
Command:   TYPE I
Response:   200 Type set to I.
Command:   PASV
Response:   227 Entering Passive Mode (52,206,191,229,214,221).
Command:   LIST
Response:   550 Access is denied. 
Command:   SIZE sw_user_import.csv
Response:   550 Access is denied. 
Command:   PASV
Response:   227 Entering Passive Mode (52,206,191,229,214,216).
Command:   STOR sw_user_import.csv
Response:   150 Opening BINARY mode data connection.
Response:   226 Transfer complete.
Status:   File transfer successful, transferred 173,989 bytes in 1 second
Status:   Retrieving directory listing of "/"...
Command:   PASV
Response:   227 Entering Passive Mode (52,206,191,229,214,223).
Command:   LIST
Response:   550 Access is denied. 
Error:   Failed to retrieve directory listing


Is there a set of options I can use to work around this issue, and have WinSCP consistently work (especially via a script)?
Thank you,
Joel

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,440
Location:
Prague, Czechia

Re: Upload file fails when account has no LIST permission

I have no idea what does the server mean by "The specified network name is no longer available."
Nor I see any relation of your upload problem to the "no LIST permission".

Did you consult this with the server administrator? Is there anything useful in the FTP server log file?

Reply with quote

Advertisement

You can post new topics in this forum