I use the Netbeans "Upload on save" functionality with a remote FTP server. It generally works well and to me, it implies that if I create, edit, rename, or delete a file *within* the Netbeans IDE, this will be replicated on the server. However, it seems to go far beyond this with potentially serious consequences. Activity happening outside the IDE is also replicated on the server, taking the control away from the user. This is not desirable - the function has transformed from a user-initiated process to an automatic one without the consent of the user. Please make (automatic) "remote synchronization" an optional feature and not mandatory. "Upload on save" functionality in programs like Dreamweaver do the job just fine - external changes to the source folders appear in the folder view, and you are notified if an open document has been changed on the server, but no changes are made to the remote host without being initiated by a user action within the IDE.
Not sure whether it is doable since we (PHP) simply get the events from FS. However, you can try to disable auto-scanning of sources , it might work for you.
Let me know if it helps you, thanks.
 Tools > Options > Miscellaneous > Files
Thank you for your fast response. I disabled that option but it doesn't seem to fix the problem because a) it still scans and makes changes to remote files on startup and b) there's no auto-scan (obviously) which is actually useful.
I was hoping for a solution where "Remote Synchronization" and "Upload on Save" were split into separate options. That is:
1. Remote synchronization: keeps local and remote files synchronized. Listens and repsonds to FS events.
2. Upload on Save: uploads/deletes/moves only in response to internal IDE events, eg. an IDE file save initiates the FTP upload procedure (chained command style). Auto-scanning still takes place but no action is taken on remote files in response to FS events. I guess one issue with this is dealing with conflict in externally-changed open files. For this, Dreamweaver brings up a dialog, "File has been modified externally. Do you want to reload it?", which is sufficient.
(In reply to comment #2)
> I was hoping for a solution where "Remote Synchronization" and "Upload on Save"
> were split into separate options.
Unfortunately IMHO not possible but I will try to investigate (after NB 7.1).
(In reply to comment #3)
> (In reply to comment #2)
> > I was hoping for a solution where "Remote Synchronization" and "Upload on Save"
> > were split into separate options.
> Unfortunately IMHO not possible but I will try to investigate (after NB 7.1).
I know I would benefit from a way to temporarily disable remote sync when I need top make external changes.
Perhaps the "Upload Files" option can be replicated to a more accessible place. This way a user could easily switch from "On Save" to "Manual", or "On Run" when making external changes that are not intended to be uploaded to the server.
It would have to somehow be associated with the project in question as it is possible to have multiple projects open simultaneously.
This is not exactly the original request but it may still be deemed helpful. I know it would be for me.
I am with email@example.com and option to easily switch from "On Save", "Manual" or "On Run/AutoSync" for all project as also for individual folders/files.
(In reply to Tomas Mysik from comment #1)
> Not sure whether it is doable since we (PHP) simply get the events from FS.
Thanks, i was looking for this info.
I also encountered this issue in NetBeans 8. While i deleted the local copy of a big binary directory via Windows Explorer, NetBeans triggered and started deleting this via FTP as well.
I'd advocate having Upload-On-Save actually trigger on the IDE save operation, and making Upload-On-FileSystem-Change a seperate option.
I no longer dare having NetBeans8 open while doing ANY file mutations outside of it, i now wonder what else it changed on the FTP site without my intention. :S
Not a defect, please do not change it. Thanks.
I also think that "upload on save" does not imply synchronization, and the two should not be joined into a single feature.
If it's not possible to separate the two, the configuration dialog should at least explain the full consequences of using the "upload on save" feature.
While no-one seems to be suggesting the "synchronization" be eliminated, it certainly would be an improvement to usability to give more granular control over this feature.
I second previous commentator. This is danger behavior of netbeans to sync changes maked outside of IDE.
Please add option "Upload external changes" like in PhpStorm:
"Select this check box to have PhpStorm upload also the local changes that were made using a third-party tool."
I agree with the request and I think this should have a higher priority because this can be a dangerous feature! And also I don't consider it enhancement but a defect, because upload files "On Save" doesn't imply synchronization of files saved outside Netbeans and is misleading.
I had a few cases of some files on my server being overwritten without my consent just because I opened a project after a few months of not working on it and suddenly I saw some ftp activity in the log. In certain scenarios this could be fatal!
If you are only getting events from the FS then can't Netbeans be changed so that you get events from Netbeans that initiates/finishes file saving process? In my opinion this should happen because the current implementation is inconvenient, dangerous and misleading - it can sometimes be handy but only as an optional behaviour.
As a minimal fix I think the naming should be changed to something like "On Save by Any Application" or to something meaning "Synchronization".
This "automatic sync outside the IDE" has damaged more than one file on me. Scenario:
1. Outside the IDE, start to FTP a large file from my site on the server
2. NetBeans sees the partially downloaded file in the local directory and starts uploading it to the file being downloaded.
3. non-Netbeans FTP gets an error because the remote file can't be accessed.
4. Both files - on my local machine and on the server - are truncated and broken.
This is clearly a bug. It has broken many graphics images, PDFs, and error logs!
The original report "Option to enable/disable remote synchronization" is not a bug, definitely. If you have any issues, please submit them as a new report with IDE log and exact steps to reproduce.