Connected to SFTP but cannot list folders.
Hi everyone!
I have a problem with PhpStorm, I can connect to sftp but it does NOT list folders and it cannot upload.
However in filezilla I can connect easily and list all folders with same settings.
Any suggestions?
Please sign in to leave a comment.
Hi there,
Enable additional logging for Deployment operations (see https://intellij-support.jetbrains.com/hc/en-us/articles/207241115-How-to-Collecting-PhpStorm-WebStorm-debug-Logs) and check the detailed log -- it should give the hints.
So far it could be that IDE does not support specific chipher that your SFTP server uses when encrypting data .. or some other incompatibility/specific server configuration.
I only see "521 Data connection cannot be opened with this PROT setting. " :(
What does that mean?
2018-01-09 19:17:56,090 [132821203] DEBUG - t.connections.RemoteConnection - Opening connection to ftps://rd158.mitramark.com:21/ in @5c46a164
2018-01-09 19:17:56,090 [132821203] DEBUG - t.config.sockets.SocketWrapper - Default socket connection to rd158.mitramark.com/5.134.10.158:21 0
2018-01-09 19:17:56,173 [132821286] DEBUG - ains.plugins.webDeployment.ftp - 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 18:17. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
2018-01-09 19:17:56,174 [132821287] DEBUG - ains.plugins.webDeployment.ftp - AUTH TLS
2018-01-09 19:17:56,213 [132821326] DEBUG - ains.plugins.webDeployment.ftp - 234 AUTH TLS OK.
2018-01-09 19:17:56,384 [132821497] DEBUG - ains.plugins.webDeployment.ftp - USER rd158mitramark
2018-01-09 19:17:56,424 [132821537] DEBUG - ains.plugins.webDeployment.ftp - 331 User rd158mitramark OK. Password required
2018-01-09 19:17:56,424 [132821537] DEBUG - ains.plugins.webDeployment.ftp - PASS ***
2018-01-09 19:17:56,545 [132821658] DEBUG - ains.plugins.webDeployment.ftp - 230 OK. Current restricted directory is /
2018-01-09 19:17:56,545 [132821658] DEBUG - ains.plugins.webDeployment.ftp - TYPE I
2018-01-09 19:17:56,585 [132821698] DEBUG - ains.plugins.webDeployment.ftp - 200 TYPE is now 8-bit binary
2018-01-09 19:17:56,586 [132821699] DEBUG - ains.plugins.webDeployment.ftp - SYST
2018-01-09 19:17:56,626 [132821739] DEBUG - ains.plugins.webDeployment.ftp - 215 UNIX Type: L8
2018-01-09 19:17:56,627 [132821740] DEBUG - ains.plugins.webDeployment.ftp - PASV
2018-01-09 19:17:56,667 [132821780] DEBUG - ains.plugins.webDeployment.ftp - 227 Entering Passive Mode (5,134,10,158,184,237)
2018-01-09 19:17:56,667 [132821780] DEBUG - t.config.sockets.SocketWrapper - Default socket connection to /5.134.10.158:47341 0
2018-01-09 19:17:56,714 [132821827] DEBUG - ains.plugins.webDeployment.ftp - LIST
2018-01-09 19:17:56,754 [132821867] DEBUG - ains.plugins.webDeployment.ftp - 521 Data connection cannot be opened with this PROT setting.
2018-01-09 19:17:56,755 [132821868] DEBUG - ains.plugins.webDeployment.ftp - PASV
2018-01-09 19:17:56,795 [132821908] DEBUG - ains.plugins.webDeployment.ftp - 227 Entering Passive Mode (5,134,10,158,185,195)
2018-01-09 19:17:56,796 [132821909] DEBUG - t.config.sockets.SocketWrapper - Default socket connection to /5.134.10.158:47555 0
2018-01-09 19:17:56,838 [132821951] DEBUG - ains.plugins.webDeployment.ftp - LIST
2018-01-09 19:17:56,877 [132821990] DEBUG - ains.plugins.webDeployment.ftp - 521 Data connection cannot be opened with this PROT setting.
2018-01-09 19:17:56,878 [132821991] DEBUG - t.connections.RemoteConnection - Added connection to pool offtps://rd158.mitramark.com:21/ in @5c46a164; 1 connections exists
2018-01-09 19:17:56,878 [132821991] DEBUG - ains.plugins.webDeployment.ftp - PWD
2018-01-09 19:17:56,918 [132822031] DEBUG - ains.plugins.webDeployment.ftp - 257 "/" is your current location
2018-01-09 19:17:56,918 [132822031] DEBUG - t.connections.RemoteConnection - Releasing one of the connections to ftps://rd158.mitramark.com:21/ in @5c46a164; connections left 0
2018-01-09 19:17:59,029 [132824142] DEBUG - t.connections.RemoteConnection - Opening connection to ftps://rd158.mitramark.com:21/ in @33ee963a
2018-01-09 19:17:59,126 [132824239] DEBUG - ains.plugins.webDeployment.ftp - 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 2 of 50 allowed.
220-Local time is now 18:17. Server port: 21.
220-This is a private system - No anonymous login
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
2018-01-09 19:17:59,127 [132824240] DEBUG - ains.plugins.webDeployment.ftp - AUTH TLS
2018-01-09 19:17:59,173 [132824286] DEBUG - ains.plugins.webDeployment.ftp - 234 AUTH TLS OK.
2018-01-09 19:17:59,362 [132824475] DEBUG - ains.plugins.webDeployment.ftp - USER rd158mitramark
2018-01-09 19:17:59,409 [132824522] DEBUG - ains.plugins.webDeployment.ftp - 331 User rd158mitramark OK. Password required
2018-01-09 19:17:59,409 [132824522] DEBUG - ains.plugins.webDeployment.ftp - PASS ***
2018-01-09 19:17:59,546 [132824659] DEBUG - ains.plugins.webDeployment.ftp - 230 OK. Current restricted directory is /
2018-01-09 19:17:59,546 [132824659] DEBUG - ains.plugins.webDeployment.ftp - TYPE I
2018-01-09 19:17:59,592 [132824705] DEBUG - ains.plugins.webDeployment.ftp - 200 TYPE is now 8-bit binary
2018-01-09 19:17:59,593 [132824706] DEBUG - ains.plugins.webDeployment.ftp - CWD /
2018-01-09 19:17:59,640 [132824753] DEBUG - ains.plugins.webDeployment.ftp - 250 OK. Current directory is /
2018-01-09 19:17:59,640 [132824753] DEBUG - ains.plugins.webDeployment.ftp - SYST
2018-01-09 19:17:59,687 [132824800] DEBUG - ains.plugins.webDeployment.ftp - 215 UNIX Type: L8
2018-01-09 19:17:59,687 [132824800] DEBUG - ains.plugins.webDeployment.ftp - PASV
2018-01-09 19:17:59,734 [132824847] DEBUG - ains.plugins.webDeployment.ftp - 227 Entering Passive Mode (5,134,10,158,151,75)
2018-01-09 19:17:59,782 [132824895] DEBUG - ains.plugins.webDeployment.ftp - LIST
2018-01-09 19:17:59,829 [132824942] DEBUG - ains.plugins.webDeployment.ftp - 521 Data connection cannot be opened with this PROT setting.
2018-01-09 19:17:59,830 [132824943] DEBUG - ains.plugins.webDeployment.ftp - PASV
2018-01-09 19:17:59,877 [132824990] DEBUG - ains.plugins.webDeployment.ftp - 227 Entering Passive Mode (5,134,10,158,173,13)
2018-01-09 19:17:59,919 [132825032] DEBUG - ains.plugins.webDeployment.ftp - LIST
2018-01-09 19:17:59,967 [132825080] DEBUG - ains.plugins.webDeployment.ftp - 521 Data connection cannot be opened with this PROT setting.
2018-01-09 19:17:59,967 [132825080] DEBUG - t.connections.RemoteConnection - Added connection to pool offtps://rd158.mitramark.com:21/ in @33ee963a; 1 connections exists
2018-01-09 19:18:01,517 [132826630] DEBUG - t.connections.RemoteConnection - Releasing one of the connections to ftps://rd158.mitramark.com:21/ in @33ee963a; connections left 0
2018-01-09 19:18:01,540 [132826653] WARN - t.connections.RemoteConnection - Forced closing file system of ftps://rd158.mitramark.com:21/ in @33ee963a
2018-01-09 19:18:01,541 [132826654] DEBUG - ains.plugins.webDeployment.ftp - QUIT
2018-01-09 19:18:01,588 [132826701] DEBUG - ains.plugins.webDeployment.ftp - 221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
221 Logout.
2018-01-09 19:18:01,590 [132826703] DEBUG - t.connections.RemoteConnection - File system of ftps://rd158.mitramark.com:21/ in @33ee963a is closed.
Honestly -- no solid idea.I'm not a SFTP expert by any means + don't really have much experience with it (still using plain FTP or other means).
From what I see -- it tires to enter into a passive mode -- is that really needed? Maybe it's because your are using port 21 and IDE has some logic in this regard... Can you connect on standard port 22?
I could not find exact match in existing tickets on Issue Tracker. The best match was https://youtrack.jetbrains.com/issue/WI-36801
Maybe more knowledgeable in this area member of JetBrains Support team will be able to help.
Please try following Elena's advice here: https://youtrack.jetbrains.com/issue/WI-15998#comment=27-428574
@Eugene .. nope, then it does not want to connect :(
> nope, then it does not want to connect :(
At least it's something we can work with. Please leave the change and re-collect the IDE log (please upload it somewhere, it'd be much more convenient). Thank you!
I got this from server guys..
If a FTP client such as Filezilla connects without issue this enforces the issue is either with the configuration of the apps/clients you are using and them possibly not supporting TLSv1.2 or the strict SSL Ciphers that we use, by default TLSv1 is not supported on any of the GURU platform as it is a insecure SSL protocol.
Port 21 is used for FTPES/FTP over Explicit TLS which is the mode your client would need to support (You may see Force TLS as an option)
Please check with the developer of the applications that they support FTPES/FTP over Explicit SSL/TLS and they support TLSv1.2 and are not attempting to use TLSv1.
any ideas on this? :D
>Port 21 is used for FTPES/FTP over Explicit TLS
So .. you actually need a FTPS type of connection and not SFTP -- those are 2 different connection types in PhpStorm.
Which one have you actually used? Screenshot perhaps? The thread subject mentions SFTP...
If you have used SFTP connection .. try the correct FTPS and see how it goes. If still nothing -- please provide logs for that.
>Please check with the developer of the applications that they support FTPES/FTP over Explicit SSL/TLS and they support TLSv1.2 and are not attempting to use TLSv1.
From what I see the TLSv1.2 for FTPS might not be supported yet: https://youtrack.jetbrains.com/issue/WI-26314