FTP sync on save does not overwrite the file on server
Hi,
I configured my project to sync from FTP (virtual machine using openSUSE 42.1 with pureftpd). It uploads the file correct on save action. But when I look via SSH at the server I am seeing that the file isn't been overwritten, instead it creates example.php.1, on next save example.php.2, etc.
I searched a bit the internet and I figured out that this must be an option to specify in FTP protocol. But I can't find an option to do so in phpstorm. Any help to this would be great. For now I have to rename every time on save the file and delete the 2nd generated file on server.
PS: There is also no log in phpstorm log saying that something has failed, just INFO level logs about where it saves the temp file locally.
Best Regards,
Thomas
Please sign in to leave a comment.
Hello,
Please enable extended Deployment log as per https://intellij-support.jetbrains.com/hc/en-us/articles/207241115 and then reproduce the issue and check if there will be any warnings or errors in the log.
Here it is:
I think the problem is the default file permission, isn't it? Everything else seems to be correct to me:
2017-07-13 18:25:17,597 [ 13188] INFO - tartup.impl.StartupManagerImpl - D:/remotephp/sw53-test/.idea case-sensitivity: expected=false actual=false
2017-07-13 18:25:18,095 [ 13686] INFO - il.indexing.FileBasedIndexImpl - scheduleIndexRebuild, reason: checkRebuild
2017-07-13 18:25:18,147 [ 13738] INFO - tor.impl.FileEditorManagerImpl - Project opening took 7174 ms
2017-07-13 18:25:20,445 [ 16036] INFO - .diagnostic.PerformanceWatcher - Pushing properties took 4995ms; general responsiveness: ok; EDT responsiveness: 2/5 sluggish, 1/5 very slow
2017-07-13 18:25:27,361 [ 22952] INFO - ij.psi.stubs.StubUpdatingIndex - Following new file types will be indexed:SQL,Bash,ECMAScript 6,Sass,htaccess,TypeScript JSX,ActionScript,PHP,Less,Ini,JavaScript,TypeScript,XML,JSX Harmony,CoffeeScript,Literate CoffeeScript,Flow,CSS,Twig,SCSS,HTML
2017-07-13 18:25:29,096 [ 24687] INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 1646ms; general responsiveness: ok; EDT responsiveness: ok
2017-07-13 18:25:29,105 [ 24696] INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 20494 files to update
2017-07-13 18:26:09,961 [ 65552] INFO - lij.diagnostic.DebugLogManager - Set DEBUG for the following categories: com.jetbrains.plugins.webDeployment
2017-07-13 18:26:56,070 [ 111661] DEBUG - Deployment.AutoUploadComponent - Checking for related changes File Watchers
2017-07-13 18:26:56,246 [ 111837] INFO - s.webDeployment.PublishUtils$1 - Using "C:\Users\Thomas\AppData\Local\Temp\vfs_cache" as temporary files store.
2017-07-13 18:26:57,691 [ 113282] DEBUG - ctions.RemoteConnectionManager - Extended JCE off
2017-07-13 18:26:57,752 [ 113343] DEBUG - t.connections.RemoteConnection - Opening connection to ftp://192.168.178.24:21/ in @14a9770d
2017-07-13 18:26:57,810 [ 113401] DEBUG - ains.plugins.webDeployment.ftp - 220-Welcome to Pure-FTPd.
220-You are user number 1 of 10 allowed.
220-Local time is now 18:26. 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.
2017-07-13 18:26:57,812 [ 113403] DEBUG - ains.plugins.webDeployment.ftp - USER thomas
2017-07-13 18:26:57,816 [ 113407] DEBUG - ains.plugins.webDeployment.ftp - 331 User thomas OK. Password required
2017-07-13 18:26:57,816 [ 113407] DEBUG - ains.plugins.webDeployment.ftp - PASS ***
2017-07-13 18:26:57,853 [ 113444] DEBUG - ains.plugins.webDeployment.ftp - 230 OK. Current directory is /home/thomas
2017-07-13 18:26:57,856 [ 113447] DEBUG - ains.plugins.webDeployment.ftp - TYPE I
2017-07-13 18:26:57,856 [ 113447] DEBUG - ains.plugins.webDeployment.ftp - 200 TYPE is now 8-bit binary
2017-07-13 18:26:57,858 [ 113449] DEBUG - ains.plugins.webDeployment.ftp - CWD /srv/www/vhosts/sw-53.thomas.dev
2017-07-13 18:26:57,859 [ 113450] DEBUG - ains.plugins.webDeployment.ftp - 250 OK. Current directory is /srv/www/vhosts/sw-53.thomas.dev
2017-07-13 18:26:57,885 [ 113476] DEBUG - ains.plugins.webDeployment.ftp - FEAT
2017-07-13 18:26:57,888 [ 113479] DEBUG - ains.plugins.webDeployment.ftp - 211-Extensions supported:
EPRT
IDLE
MDTM
SIZE
MFMT
REST STREAM
MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
MLSD
AUTH TLS
PBSZ
PROT
UTF8
ESTA
PASV
EPSV
SPSV
ESTP
211 End.
2017-07-13 18:26:57,909 [ 113500] DEBUG - ains.plugins.webDeployment.ftp - PORT 192,168,178,47,193,48
2017-07-13 18:26:57,911 [ 113502] DEBUG - ains.plugins.webDeployment.ftp - 200 PORT command successful
2017-07-13 18:26:57,911 [ 113502] DEBUG - ains.plugins.webDeployment.ftp - MLSD
2017-07-13 18:26:57,915 [ 113506] DEBUG - ains.plugins.webDeployment.ftp - 150 Connecting to port 49456
2017-07-13 18:26:58,122 [ 113713] DEBUG - ains.plugins.webDeployment.ftp - type=cdir;sizd=4096;modify=20170712213211;UNIX.mode=0755;UNIX.uid=1000;UNIX.gid=100;unique=802ga071e; .
2017-07-13 18:26:58,122 [ 113713] DEBUG - ains.plugins.webDeployment.ftp - type=pdir;sizd=4096;modify=20170707192810;UNIX.mode=0775;UNIX.uid=30;UNIX.gid=100;unique=802ga05d0; ..
2017-07-13 18:26:58,122 [ 113713] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=357;modify=20170707192913;UNIX.mode=0644;UNIX.uid=1000;UNIX.gid=100;unique=802ga5182; .editorconfig
2017-07-13 18:26:58,122 [ 113713] DEBUG - ains.plugins.webDeployment.ftp - type=dir;sizd=4096;modify=20170712213912;UNIX.mode=0755;UNIX.uid=1000;UNIX.gid=100;unique=802ga329c; .git
2017-07-13 18:26:58,122 [ 113713] DEBUG - ains.plugins.webDeployment.ftp - type=dir;sizd=4096;modify=20170707192913;UNIX.mode=0755;UNIX.uid=1000;UNIX.gid=100;unique=802ga5183; .github
2017-07-13 18:26:58,123 [ 113714] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=1228;modify=20170712212644;UNIX.mode=0644;UNIX.uid=1000;UNIX.gid=100;unique=802ga701f; .gitignore
2017-07-13 18:26:58,123 [ 113714] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=3085;modify=20170707192913;UNIX.mode=0644;UNIX.uid=1000;UNIX.gid=100;unique=802ga5186; .htaccess
2017-07-13 18:26:58,124 [ 113715] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=1661;modify=20170707192913;UNIX.mode=0644;UNIX.uid=1000;UNIX.gid=100;unique=802ga5187; .php_cs.dist
2017-07-13 18:26:58,124 [ 113715] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=450;modify=20170707192913;UNIX.mode=0644;UNIX.uid=1000;UNIX.gid=100;unique=802ga5188; .travis.yml
2017-07-13 18:26:58,124 [ 113715] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=3576;modify=20170707192913;UNIX.mode=0644;UNIX.uid=1000;UNIX.gid=100;unique=802ga5189; CONTRIBUTING.md
2017-07-13 18:26:58,124 [ 113715] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=6022;modify=20170707192913;UNIX.mode=0644;UNIX.uid=1000;UNIX.gid=100;unique=802ga518a; README.md
2017-07-13 18:26:58,124 [ 113715] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=39513;modify=20170707192913;UNIX.mode=0644;UNIX.uid=1000;UNIX.gid=100;unique=802ga518b; UPGRADE-5.0.md
2017-07-13 18:26:58,124 [ 113715] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=21126;modify=20170707192913;UNIX.mode=0644;UNIX.uid=1000;UNIX.gid=100;unique=802ga518c; UPGRADE-5.1.md
2017-07-13 18:26:58,125 [ 113716] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=51589;modify=20170707193034;UNIX.mode=0644;UNIX.uid=1000;UNIX.gid=100;unique=802ga518d; UPGRADE-5.2.md
2017-07-13 18:26:58,125 [ 113716] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=39954;modify=20170707193034;UNIX.mode=0644;UNIX.uid=1000;UNIX.gid=100;unique=802ga55ae; UPGRADE-5.3.md
2017-07-13 18:26:58,125 [ 113716] DEBUG - ains.plugins.webDeployment.ftp - type=dir;sizd=4096;modify=20170707192913;UNIX.mode=0755;UNIX.uid=1000;UNIX.gid=100;unique=802ga518e; _sql
2017-07-13 18:26:58,125 [ 113716] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=1197;modify=20170707192913;UNIX.mode=0644;UNIX.uid=1000;UNIX.gid=100;unique=802ga556e; autoload.php
2017-07-13 18:26:58,125 [ 113716] DEBUG - ains.plugins.webDeployment.ftp - type=dir;sizd=4096;modify=20170707192913;UNIX.mode=0755;UNIX.uid=1000;UNIX.gid=100;unique=802ga556f; bin
2017-07-13 18:26:58,126 [ 113717] DEBUG - ains.plugins.webDeployment.ftp - type=dir;sizd=4096;modify=20170707195002;UNIX.mode=0755;UNIX.uid=1000;UNIX.gid=100;unique=802ga5572; build
2017-07-13 18:26:58,126 [ 113717] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=4311;modify=20170707193034;UNIX.mode=0644;UNIX.uid=1000;UNIX.gid=100;unique=802ga5581; composer.json
2017-07-13 18:26:58,126 [ 113717] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=212804;modify=20170707193034;UNIX.mode=0644;UNIX.uid=1000;UNIX.gid=100;unique=802ga5582; composer.lock
2017-07-13 18:26:58,126 [ 113717] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=1838958;modify=20170707193537;UNIX.mode=0755;UNIX.uid=1000;UNIX.gid=100;unique=802ga0509; composer.phar
2017-07-13 18:26:58,126 [ 113717] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=306;modify=20170707224020;UNIX.mode=0644;UNIX.uid=1000;UNIX.gid=100;unique=802ga0508; config.php
2017-07-13 18:26:58,127 [ 113718] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=210;modify=20170707192913;UNIX.mode=0644;UNIX.uid=1000;UNIX.gid=100;unique=802ga5583; config.php.dist
2017-07-13 18:26:58,127 [ 113718] DEBUG - ains.plugins.webDeployment.ftp - type=dir;sizd=4096;modify=20170707192913;UNIX.mode=0755;UNIX.uid=1000;UNIX.gid=100;unique=802ga5584; custom
2017-07-13 18:26:58,127 [ 113718] DEBUG - ains.plugins.webDeployment.ftp - type=dir;sizd=4096;modify=20170707192914;UNIX.mode=0755;UNIX.uid=1000;UNIX.gid=100;unique=802ga5587; engine
2017-07-13 18:26:58,127 [ 113718] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=48492;modify=20170707192914;UNIX.mode=0644;UNIX.uid=1000;UNIX.gid=100;unique=802ga58aa; eula.txt
2017-07-13 18:26:58,127 [ 113718] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=48003;modify=20170707192914;UNIX.mode=0644;UNIX.uid=1000;UNIX.gid=100;unique=802ga58ab; eula_en.txt
2017-07-13 18:26:58,127 [ 113718] DEBUG - ains.plugins.webDeployment.ftp - type=dir;sizd=4096;modify=20170712210008;UNIX.mode=0777;UNIX.uid=1000;UNIX.gid=100;unique=802ga58ac; files
2017-07-13 18:26:58,127 [ 113718] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=34899;modify=20170707192914;UNIX.mode=0644;UNIX.uid=1000;UNIX.gid=100;unique=802ga58b1; license.txt
2017-07-13 18:26:58,127 [ 113718] DEBUG - ains.plugins.webDeployment.ftp - type=dir;sizd=4096;modify=20170707195626;UNIX.mode=0777;UNIX.uid=1000;UNIX.gid=100;unique=802ga58b2; media
2017-07-13 18:26:58,127 [ 113718] DEBUG - ains.plugins.webDeployment.ftp - type=dir;sizd=4096;modify=20170707192914;UNIX.mode=0755;UNIX.uid=1000;UNIX.gid=100;unique=802ga58c6; recovery
2017-07-13 18:26:58,128 [ 113719] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=4418;modify=20170707192933;UNIX.mode=0644;UNIX.uid=1000;UNIX.gid=100;unique=802ga58e2; shopware.php
2017-07-13 18:26:58,128 [ 113719] DEBUG - ains.plugins.webDeployment.ftp - type=dir;sizd=4096;modify=20170707192914;UNIX.mode=0755;UNIX.uid=1000;UNIX.gid=100;unique=802ga58e3; snippets
2017-07-13 18:26:58,128 [ 113719] DEBUG - ains.plugins.webDeployment.ftp - type=dir;sizd=4096;modify=20170707192914;UNIX.mode=0755;UNIX.uid=1000;UNIX.gid=100;unique=802gc4933; tests
2017-07-13 18:26:58,128 [ 113719] DEBUG - ains.plugins.webDeployment.ftp - type=dir;sizd=4096;modify=20170707193034;UNIX.mode=0755;UNIX.uid=1000;UNIX.gid=100;unique=802gc4b23; themes
2017-07-13 18:26:58,128 [ 113719] DEBUG - ains.plugins.webDeployment.ftp - type=dir;sizd=4096;modify=20170707192915;UNIX.mode=0777;UNIX.uid=1000;UNIX.gid=100;unique=802gc5797; var
2017-07-13 18:26:58,128 [ 113719] DEBUG - ains.plugins.webDeployment.ftp - type=dir;sizd=4096;modify=20170707194819;UNIX.mode=0755;UNIX.uid=1000;UNIX.gid=100;unique=802gc579d; vendor
2017-07-13 18:26:58,128 [ 113719] DEBUG - ains.plugins.webDeployment.ftp - type=dir;sizd=4096;modify=20170707192915;UNIX.mode=0777;UNIX.uid=1000;UNIX.gid=100;unique=802gc579f; web
2017-07-13 18:26:58,132 [ 113723] DEBUG - ains.plugins.webDeployment.ftp - 226-Options: -a -l
226 39 matches total
2017-07-13 18:26:58,163 [ 113754] DEBUG - t.connections.RemoteConnection - Added connection to pool offtp://192.168.178.24:21/ in @14a9770d; 1 connections exists
2017-07-13 18:26:58,171 [ 113762] DEBUG - ins.webDeployment.TransferTask - Starting server-side modification
2017-07-13 18:26:58,175 [ 113766] DEBUG - ins.webDeployment.TransferTask - Publish config:
<State autoUpload="On explicit save action" promptOnRemoteOverwrite="NONE" serverName="Shopware-53-VM" stopOnFirstError="false" overwriteAll="true" preserveTimestamps="true" deleteMissingItems="true" createEmptyFolders="false" traceLevel="BRIEF" promptOnLocalOverwrite="true" persistUploadOnCheckin="true" exclude=".svn;.cvs;.idea;.DS_Store;.git;.hg" filePermissions="-1" folderPermissions="-1" autoUploadExternalChanges="false" notifyRemoteChanges="false" compareModeInSync="CONTENT" showEqualInSync="false" showDifferentInSync="true" showNewOnSourceInSync="true" showNewOnTargetInSync="true" showExcludedInSync="false">
<servers />
<serverData>
<paths name="Shopware-53-VM">
<serverdata>
<mappings>
<mapping deploy="/" local="D:/remotephp/sw53-test" web="/" />
</mappings>
<excludedPaths />
</serverdata>
</paths>
</serverData>
<option name="myUploadOnCheckinName" />
<option name="myAutoUpload" value="ON_EXPLICIT_SAVE" />
</State>
2017-07-13 18:26:58,177 [ 113768] DEBUG - ins.webDeployment.TransferTask - Server config:
<ServerPasswordSafeDeployable />
2017-07-13 18:26:58,202 [ 113793] DEBUG - ains.plugins.webDeployment.ftp - PORT 192,168,178,47,193,49
2017-07-13 18:26:58,209 [ 113800] DEBUG - ains.plugins.webDeployment.ftp - 200 PORT command successful
2017-07-13 18:26:58,212 [ 113803] DEBUG - ains.plugins.webDeployment.ftp - MLSD engine/Shopware/Plugins/Community/Frontend/testPlugin/Views/frontend/listing/product-box
2017-07-13 18:26:58,213 [ 113804] DEBUG - ains.plugins.webDeployment.ftp - 150 Connecting to port 49457
2017-07-13 18:26:58,257 [ 113848] DEBUG - ains.plugins.webDeployment.ftp - type=cdir;sizd=4096;modify=20170712205841;UNIX.mode=0777;UNIX.uid=1000;UNIX.gid=100;unique=802ge32cb; .
2017-07-13 18:26:58,257 [ 113848] DEBUG - ains.plugins.webDeployment.ftp - type=pdir;sizd=4096;modify=20170707205824;UNIX.mode=0777;UNIX.uid=1000;UNIX.gid=100;unique=802ge30e0; ..
2017-07-13 18:26:58,257 [ 113848] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=423;modify=20170712205736;UNIX.mode=0644;UNIX.uid=1000;UNIX.gid=100;unique=802ge48e7; product-badges.tpl
2017-07-13 18:26:58,258 [ 113849] DEBUG - ains.plugins.webDeployment.ftp - 226-Options: -a -l
226 3 matches total
2017-07-13 18:26:58,266 [ 113857] DEBUG - ains.plugins.webDeployment.ftp - PORT 192,168,178,47,193,50
2017-07-13 18:26:58,266 [ 113857] DEBUG - ains.plugins.webDeployment.ftp - 200 PORT command successful
2017-07-13 18:26:58,266 [ 113857] DEBUG - ains.plugins.webDeployment.ftp - STOR engine/Shopware/Plugins/Community/Frontend/testPlugin/Views/frontend/listing/product-box/product-badges.tpl
2017-07-13 18:26:58,269 [ 113860] DEBUG - ains.plugins.webDeployment.ftp - 150 Connecting to port 49458
2017-07-13 18:26:58,318 [ 113909] DEBUG - ains.plugins.webDeployment.ftp - 226-File successfully transferred
226 0.046 seconds (measured here), 9.15 Kbytes per second
2017-07-13 18:26:58,319 [ 113910] DEBUG - ains.plugins.webDeployment.ftp - PORT 192,168,178,47,193,51
2017-07-13 18:26:58,320 [ 113911] DEBUG - ains.plugins.webDeployment.ftp - 200 PORT command successful
2017-07-13 18:26:58,320 [ 113911] DEBUG - ains.plugins.webDeployment.ftp - MLSD engine/Shopware/Plugins/Community/Frontend/testPlugin/Views/frontend/listing/product-box
2017-07-13 18:26:58,321 [ 113912] DEBUG - ains.plugins.webDeployment.ftp - 150 Connecting to port 49459
2017-07-13 18:26:58,321 [ 113912] DEBUG - ains.plugins.webDeployment.ftp - type=cdir;sizd=4096;modify=20170713162700;UNIX.mode=0777;UNIX.uid=1000;UNIX.gid=100;unique=802ge32cb; .
2017-07-13 18:26:58,321 [ 113912] DEBUG - ains.plugins.webDeployment.ftp - type=pdir;sizd=4096;modify=20170707205824;UNIX.mode=0777;UNIX.uid=1000;UNIX.gid=100;unique=802ge30e0; ..
2017-07-13 18:26:58,321 [ 113912] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=423;modify=20170712205736;UNIX.mode=0644;UNIX.uid=1000;UNIX.gid=100;unique=802ge48e7; product-badges.tpl
2017-07-13 18:26:58,321 [ 113912] DEBUG - ains.plugins.webDeployment.ftp - type=file;size=435;modify=20170713162700;UNIX.mode=0644;UNIX.uid=1000;UNIX.gid=100;unique=802ge48d8; product-badges.tpl.1
2017-07-13 18:26:58,322 [ 113913] DEBUG - ains.plugins.webDeployment.ftp - 226-Options: -a -l
226 4 matches total
2017-07-13 18:26:58,326 [ 113917] DEBUG - ains.plugins.webDeployment.ftp - MFMT 20170713162655 engine/Shopware/Plugins/Community/Frontend/testPlugin/Views/frontend/listing/product-box/product-badges.tpl
2017-07-13 18:26:58,326 [ 113917] DEBUG - ains.plugins.webDeployment.ftp - 213 UTIME OK
2017-07-13 18:26:58,326 [ 113917] DEBUG - ebDeployment.TransferOperation - Transferred: /remotephp/sw53-test/engine/Shopware/Plugins/Community/Frontend/testPlugin/Views/frontend/listing/product-box/product-badges.tpl
2017-07-13 18:26:58,335 [ 113926] DEBUG - ins.webDeployment.TransferTask - finished
2017-07-13 18:26:58,340 [ 113931] DEBUG - t.connections.RemoteConnection - Releasing one of the connections to ftp://192.168.178.24:21/ in @14a9770d; connections left 0
2017-07-13 18:27:24,420 [ 140011] INFO - ide.actions.ShowFilePathAction -
Exit code 1
According to the log, this is not something PhpStorm knows about - it just sends the file.
It seems that Pure-FTPD does that, allegedly because of the autorename parameter:
https://download.pureftpd.org/pub/pure-ftpd/doc/README
Please try disabling that.
Thank you very much, that was the problem!
I just needed to remove the pure-ftpd -r startup option and everything works pretty well. In my case, it was a startup config file located under /etc/pure-ftpd/pure-ftpd.conf and just set the auto rename option from "yes" to "no". Restarted via systemd and everything worked :-)
I haven't had used FTP much in the past. More SCP, when it was possible.