When attempting to write a file, I can get this same error when any of following conditions applies:
The file exists and is marked read-only.
I don't have write permission for the folder and therefore cannot create a file.
The file is already open in another process.
Is there any way to separate out the above three causes? If not, then I would say that this is an extraordinarily poor design.
See Question&Answers more detail:os