I noticed recently that during development using the Netbeans 7.3 IDE (Build 201302132200) on a Windows 7 (Pro SP1) machine I started receiving the popup dialog:

"File X:\project\example.php was modified externally. Overwrite it?"

This happened almost every save, which started to get really annoying.

I had recently upgraded from Netbeans 7.2.1 to Netbeans 7.3, so I thought this could be the issue. I tried in Netbeans 7.2.1 on the same machine and was still receiving the popup save warnings. I also tried flushing the Netbeans cache directories, this did not fix the issue.

After much debugging and troubleshooting, I could only think of one possibility, I had recently installed/activated Microsoft Security Essentials "Real-time protection". Sure enough, after disabling this option (MS Security Essentials > Settings > Real-time protection) Netbeans was saving correctly with no warnings.

Update for Windows 8, Windows 8.1This can be solved in Windows 8 and 8.1 by adding your Web server location to the Exclude files and locations option under Settings in Windows Defender.

For my machine I used both Web server IP and hostname to get it working:
\\[server IP]\webserver\*.*
\\[server hostname]\webserver\*.*