FTPS fails to upload files

I can't upload files with PhpStorm using FTPS. I can, however, list files/folders and "Sync with Deployed to …" to see if local/remote files differ. Connection and mappings should be fine. Problem seems to be limited uploading files. More precisely PhpStorm puts an empty (zero byte) file on the server. I can't see any problems  with permissions. User is ok, files/folders are set for test purposes to 777.

Using plain FTP will work in PhpStorm. Using the same FTP account in Transmit (FTP client) – as FTP with TLS/SSL – works fine as well. So I guess it isn't related to the server itself. It is only the combination PhpStorm and FTPS.

Already tested:

- Explicit/implicit
- disable "Passive mode"
- Different ports (21 and 900)
- Restart PhpStorm (and update to 2019.3.4)
- Using plain FTP (works fine, but I need encryption, SFTP is not an option)

File transfer panel says:

[02.04.20, 13:39] Failed to transfer file '/path/cart.php': could not put FTP file "ftps://xx.xxx.xxx.xxx/www.example.com/path/cart.php".

idea.log

2020-04-02 13:39:22,233 [83805177]   WARN - ins.webDeployment.TransferTask - Copy: file:///path/cart.php to ftps://path/cart.phpfailed 

org.apache.commons.vfs2.FileSystemException: Could not copy "file:///path/cart.php" to "ftps://path/cart.php".

at com.jetbrains.plugins.webDeployment.TransferOperation.copyFileFrom(TransferOperation.java:899)

at com.jetbrains.plugins.webDeployment.TransferOperation.copyFile(TransferOperation.java:787)

at com.jetbrains.plugins.webDeployment.TransferOperation.access$200(TransferOperation.java:26)

at com.jetbrains.plugins.webDeployment.TransferOperation$Copy.execute(TransferOperation.java:221)

at com.jetbrains.plugins.webDeployment.TransferTask.executeOperations(TransferTask.java:513)

at com.jetbrains.plugins.webDeployment.RemoteHostTask.lambda$doRun$0(RemoteHostTask.java:258)

at com.jetbrains.plugins.webDeployment.connections.RemoteConnection.lambda$executeServerOperationSilently$1(RemoteConnection.java:48)

at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionPool$RemoteConnectionImpl.executeServerOperation(RemoteConnectionPool.java:141)

at com.jetbrains.plugins.webDeployment.connections.RemoteConnection.executeServerOperationSilently(RemoteConnection.java:48)

at com.jetbrains.plugins.webDeployment.RemoteHostTask.doRun(RemoteHostTask.java:258)

at com.jetbrains.plugins.webDeployment.RemoteHostTask.run(RemoteHostTask.java:105)

at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:888)

at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:163)

at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:585)

at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:531)

at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)

at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:150)

at com.intellij.openapi.progress.impl.CoreProgressManager$4.lambda$run$0(CoreProgressManager.java:402)

at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:221)

at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:402)

at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:238)

at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)

at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

at java.base/java.lang.Thread.run(Thread.java:834)

Caused by: org.apache.commons.vfs2.FileSystemException: Could not close the output stream for file "ftps://path/cart.php".

at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentOutputStream.close(DefaultFileContent.java:620)

at com.jetbrains.plugins.webDeployment.FileTransferUtil.copyContent(FileTransferUtil.java:47)

at com.jetbrains.plugins.webDeployment.TransferOperation.copyFileFrom(TransferOperation.java:896)

... 25 more

Caused by: org.apache.commons.vfs2.FileSystemException: Could not put FTP file "ftps://path/cart.php".

at org.apache.commons.vfs2.provider.ftp.FtpFileObject$FtpOutputStream.onClose(FtpFileObject.java:842)

at org.apache.commons.vfs2.util.MonitorOutputStream.close(MonitorOutputStream.java:86)

at org.apache.commons.vfs2.util.MonitorOutputStream.close(MonitorOutputStream.java:76)

at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentOutputStream.close(DefaultFileContent.java:616)

... 27 more

2020-04-02 13:47:47,307 [84310251]   WARN - rotocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: dsc=a70f78b7b3914105df110917f9ba11e8f98f2feabaa38a5b8ab0f60ef670b9f5; Path=/; Expires=Sun, 05 Apr 2020 11:47:47 GMT; Secure". Invalid 'expires' attribute: Sun, 05 Apr 2020 11:47:47 GMT 

2020-04-02 13:47:47,526 [84310470]   WARN - rotocol.ResponseProcessCookies - Invalid cookie header: "Set-Cookie: dsc=c72cc2bd4d166ce562b87fc8fcea8f7950b0e35a7b6e6e8b9d33eec668afc1ae; Path=/; Expires=Sun, 05 Apr 2020 11:47:47 GMT; Secure". Invalid 'expires' attribute: Sun, 05 Apr 2020 11:47:47 GMT 

2020-04-02 13:48:05,785 [84328729]   INFO - rationStore.ComponentStoreImpl - Registering unknown macros a.b.c in component DatabaseSettings 

 

proftpd.log


2020-04-02 19:24:36,974 example.com proftpd[11105] example.com (xdsl-xx-xx-xx-xxx.nc.de[xx.xx.xx.xx]): FTP session opened.
2020-04-02 19:24:37,210 example.com proftpd[11105] example.com (xdsl-xx-xx-xx-xxx.nc.de[xx.xx.xx.xx]): USER userloginname: Login successful.
2020-04-02 19:24:38,136 example.com proftpd[11105] example.com (xdsl-xx-xx-xx-xxx.nc.de[xx.xx.xx.xx]): notice: user userloginname: aborting transfer: Link to file server lost

tls.log

2020-04-02 19:24:37,000 mod_tls/2.6[11105]: TLS/TLS-C requested, starting TLS handshake
2020-04-02 19:24:37,151 mod_tls/2.6[11105]: TLSv1.3 renegotiation accepted, using cipher TLS_AES_128_GCM_SHA256 (128 bits)
2020-04-02 19:24:37,151 mod_tls/2.6[11105]: TLSv1.3 renegotiation accepted, using cipher TLS_AES_128_GCM_SHA256 (128 bits)
2020-04-02 19:24:37,151 mod_tls/2.6[11105]: client supports secure renegotiations
2020-04-02 19:24:37,151 mod_tls/2.6[11105]: TLSv1.3 connection accepted, using cipher TLS_AES_128_GCM_SHA256 (128 bits)
2020-04-02 19:24:37,317 mod_tls/2.6[11105]: Protection set to Private
2020-04-02 19:24:37,454 mod_tls/2.6[11105]: starting TLS negotiation on data connection
2020-04-02 19:24:37,596 mod_tls/2.6[11105]: TLSv1.3 renegotiation accepted, using cipher TLS_AES_128_GCM_SHA256 (128 bits)
2020-04-02 19:24:37,596 mod_tls/2.6[11105]: TLSv1.3 renegotiation accepted, using cipher TLS_AES_128_GCM_SHA256 (128 bits)
2020-04-02 19:24:37,596 mod_tls/2.6[11105]: TLSv1.3 data connection accepted, using cipher TLS_AES_128_GCM_SHA256 (128 bits)
2020-04-02 19:24:37,703 mod_tls/2.6[11105]: starting TLS negotiation on data connection
2020-04-02 19:24:37,845 mod_tls/2.6[11105]: TLSv1.3 renegotiation accepted, using cipher TLS_AES_128_GCM_SHA256 (128 bits)
2020-04-02 19:24:37,845 mod_tls/2.6[11105]: TLSv1.3 renegotiation accepted, using cipher TLS_AES_128_GCM_SHA256 (128 bits)
2020-04-02 19:24:37,985 mod_tls/2.6[11105]: starting TLS negotiation on data connection
2020-04-02 19:24:38,059 mod_tls/2.6[11105]: TLSv1.3 renegotiation accepted, using cipher TLS_AES_128_GCM_SHA256 (128 bits)
2020-04-02 19:24:38,059 mod_tls/2.6[11105]: TLSv1.3 renegotiation accepted, using cipher TLS_AES_128_GCM_SHA256 (128 bits)
2020-04-02 19:24:38,217 mod_tls/2.6[11105]: starting TLS negotiation on data connection
2020-04-02 19:24:38,360 mod_tls/2.6[11105]: TLSv1.3 renegotiation accepted, using cipher TLS_AES_128_GCM_SHA256 (128 bits)
2020-04-02 19:24:38,360 mod_tls/2.6[11105]: TLSv1.3 renegotiation accepted, using cipher TLS_AES_128_GCM_SHA256 (128 bits)


xferlog


Thu Apr 02 19:24:38 2020 0 xdsl-xx-xx-xx-xxx.nc.de 0 /path/cart.php b _ i r userloginname ftps 0 * i
6 comments
Comment actions Permalink

Thanks for a details investigation!

What are the ProFTPD and TLS versions on that server?

 

Would it help if you disable the firewall on the server for a brief moment as described here: https://serverfault.com/a/617390/525308?

0
Comment actions Permalink

It is ProFTPD Version 1.3.5e and should be mod_tls/2.6

I can't disable the firewall currently, but checked the link and it looks like the "threshold" is at about 8 or 10 KB where problems start to occur. A simple txt with just some text will upload fine, until it hits ~8 KB.

Will check again this evening regarding the firewall. 

0
Comment actions Permalink

Thanks.

Could you please check your VirtualHost section of Apache SSL configuration for `SSLProtocol` setting: is it TLSv1.2 or TLSv1.3 or other?

0
Comment actions Permalink

Sorry, couldn't check Firewall yet.

Apache? Where is Apache involved in this situation? The vHost hasn't anything special about SSL or TLS in it.

0
Comment actions Permalink

I think that Dmitry was asking about the TLS version configured on a server. There is a reason for such question as unfortunately, TLS 1.2+ is not supported yet:

https://youtrack.jetbrains.com/issue/WI-26314

0
Comment actions Permalink

It took a while … My server is using TLS 1.2.

Why does Jetbrains think it is ok to not support TLS 1.2? It is 12 years old and more and more hosts have deprecated or removed support for TLS < 1.2

0

Please sign in to leave a comment.