Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhpStorm failed to transfer files by FTP

Tags:

ide

phpstorm

ftp

Would like to test the IDE PhpStorm to work with but I am already stuck at the importing process.. I am running a dev server with a Zend Framework 2 project I would like to add by ftp.

Everything look likes to be OK, I see the project created the whole structure of my application. When I am opening a file, the file is empty. I tried to hit "Download from here" at the menu of the remote system but I get the following message in my transfer console.

(just a couple of all files who failure)

[15-03-14 12:47] Failed to transfer file '/var/www/vhosts/dev.site.com/composer.json': could not read from "ftp://dev.site.com/composer.json" because it is a not a file.
[15-03-14 12:47] Failed to transfer file '/var/www/vhosts/dev.site.com/composer.lock': could not read from "ftp://dev.site.com/composer.lock" because it is a not a file.
[15-03-14 12:47] Failed to transfer file '/var/www/vhosts/dev.site.com/composer.phar': could not read from "ftp://dev.site.com/composer.phar" because it is a not a file.

What happens? It seems that the files are downloaded but not it's contents? permissions etc. are good, I can add/edit this project without any problem in Aptana or Zend Studio.

like image 956
directory Avatar asked Mar 15 '14 11:03

directory


4 Answers

Just try to enable "passive mode":

Tools -> Deployment -> Configuration -> Advanced options -> [FTP-server/FTP] -> enable "Passive mode" checkbox!

like at the screenshot: FTP-passive-mode-enabling

(my PHPStorm build is 139.1348)

That fixed my troubles with 'Failed to transfer file' using FTP.

like image 91
alexglue Avatar answered Nov 09 '22 15:11

alexglue


Fix for SFTP (there is no option to set passive mode for SFTP):

  1. Go to: File -> Settings -> Build, Execution, Deployment -> Deployment -> Options
  2. uncheck option "Preserve files timestamps".

Tested in PHPStorm build 2019.3.

like image 37
Konrad Gałęzowski Avatar answered Nov 09 '22 15:11

Konrad Gałęzowski


No real clue -- but happens randomly. For me personally happened only twice since v1 .. and both of them when transferring to Linux host (my usual deployment target is running on Windows platform, IIS FTP where I never seen such problem).

In any case -- known issue -- see this ticket for details: http://youtrack.jetbrains.com/issue/WI-6742

like image 22
LazyOne Avatar answered Nov 09 '22 13:11

LazyOne


the same issue happened to me, I enabled passive mode in phpstorm and it worked.

File=>Settings=>Build, Execution,Deployment=>Deployment=>conncetion=>Advanced options=>passive mode
like image 37
Sajjad Asaad Avatar answered Nov 09 '22 13:11

Sajjad Asaad