Here's everything I've gathered so far. Method 10 definitely works but it's a dog!
1) Export any audio track as a wave file, then try to Save.
2) Use Save As.
3) Double disk I/O buffers in preferences.
4) Try saving the file to the root of the drive in question in case deep nesting is the problem
5) Delete the picture cache
6) Double "DiskRecBufSize" in Aud.ini (to 512)
7) Consolidate Audio under Tools.
Then go to the Audio folder and delete everything EXCEPT the backup folder.
Open the backup folder and move the saved audio to the Audio folder.
Delete the empty backup folder.
8) Run CheckDisk on SONAR drive ('Disk may be full' is probably not a disk issue though)
9) Reboot
10) Copy all contents to a new file.
For some reason this is not the same as Save As. It's worked for me in the past but it's a long and tedious process
if you have a lot of tracks.
a) Open a new file and save it with a new name. Open the problem file.
b) Drag the source file aside so you can see both.
c) Recreate the source tracks in the destination file and label them all just as they are in the source
d) Now drag copy (Cntrl/drag) all the effects plugs one by one from source file tracks to the corresponding destination tracks
e) Set the volume and pan settings in the destination tracks so they're the same as the source
f) Copy (Cntrl/drag) the audio and MIDI data one track at a time to the prepared destination tracks
g) Add the same synths to the Synth Rack destination file and copy any settings such as drum kit presets, fader settings, articulations, etc
Keep saving the destination file as you work. When you've finished you should have two identical files with identical plugs, settings and synths. I don't know why this works or how it's different to Save As but the new file won't give you the 'Cannot write' error.
The only reason I'm looking for another solution is because method 10 is so long and tedious.