I encountered a strange problem today.
When compiling a C++ project using a Makefile, I generate a file called temp.log.
It contains info about warnings should they be printed.
However, I accidentally interrupted the compilation process, and now I cannot access the temp.log file.
Here are the things I've tried:
- Delete the file in explorer. It disappears from the folder, but it's impossible to create a new file with the same name except for when I run my Makefile, but it fails after that since no data can be written to it.
- chmod it to 0777 in MSYS. Access denied.
- Change the owner to my account. Access denied.
- Try to access it through the command prompt run as administrator. Access denied.
- Switch to the hidden Administrator account and access it that way. Access denied.
- Use takeown as the admin account. Access denied...
I'm at my wit's end. I have absolutely no idea what's going on. Any help would be greatly appreciated.
Answer
When I run in to this normally it is because something has a exclusive handle on the file
What I do is I use Process Explorer and click the binoculars on the tool bar to open the find menu. From there you can type in the name of the file or folder and it will list all processes that have a open handle to that file.
One you find the offending program you can either terminate the program or just terminate the filehandle by right clicking on it once you have the process selected.
No comments:
Post a Comment