Author Topic: Windows 7 x64 Permission Denied: Different Symptoms  (Read 6787 times)

Offline ZodiacMentor

  • Single posting newcomer
  • *
  • Posts: 2
Windows 7 x64 Permission Denied: Different Symptoms
« on: September 08, 2012, 11:29:25 am »
Alright... Now before you go and lynch me, I used the search and found numerous posts regarding this issue. Most of them ended with "C::B does not have anything to do with this." That might be the case, but I experience some different symptoms, or maybe everyone has the same ones.

The problem with the permission denied on build doesn't in fact seem to be on the rights of the file. I tested the case a bit, and after making first build and running, the process was gone from Process Explorer, there were no locks when tried with Unlocker, and the owner was as it was supposed to be, me.

Now I go to rebuild and get an instant "Permission Denied" error. I go check the file, and weirdly, the file doesn't have any owners anymore, at all. Unlocker finds still no locks. The file cannot be deleted. It's like a ghost. Wait a few minutes, and the file is gone, by itself. Then a rebuild -> everything works as it was supposed to.

Wondering WTH is going on, after running I delete the file through explorer. It is deleted instantly. Rebuilding on Code::Blocks, the build goes as it should, nothing wrong. Now that I'm on to something, I try something different: Clean-up on Code::Blocks - and voila, the ghost file is there, it has no owner, it's right's cannot be determined, it has no locks, it cannot be deleted. Building obviously fails. I can repeat this behaviour consistently.

So my suggestion here is that there is something wrong with the way Code::Blocks cleans up. If it uses MingW for cleaning up, the problem is obviously there. It seems as if the file is marked as deleted only in the file record, but not in the MFT, which would suggest this kind of behaviour (as in it takes a few minutes for the file system to catch up that hey, this file's been deleted!). (As a sidenote, I am definitely not an expert: these are just ideas and experiments)

Anybody have any idea how to fix it?
« Last Edit: September 08, 2012, 11:31:46 am by ZodiacMentor »

zabzonk

  • Guest
Re: Windows 7 x64 Permission Denied: Different Symptoms
« Reply #1 on: September 08, 2012, 12:07:38 pm »
This really is not a CB issue. I've seen many explanations for it put forward (and put forward a couple myself), but  there seems to be no clear answer. One thing I would suggest is that you check that the Windows service "Application Experience" is enabled an is running. Since I made sure this was running, I haven't had any "permission denied" problems (touch wood), though of course this may just be coincidence.

Offline steve333

  • Single posting newcomer
  • *
  • Posts: 2
Re: Windows 7 x64 Permission Denied: Different Symptoms
« Reply #2 on: October 15, 2012, 10:48:49 pm »
Hello, I am new here and I had the same problem.
My system is Windows 7 x32 and i have installed c::b 10.05 with mingw. I compiled my program once and the second time the permission denied thing comes again and again.
After a lots of tries and reinstalls my solution was right click on c::b.exe in programs --> properties --> compatibility -->checkbox execute program as administrator
since that it runs without permissions denied errors.

rgds

ps: excuse my english, i am from austria
« Last Edit: October 15, 2012, 10:53:45 pm by steve333 »

Offline ZodiacMentor

  • Single posting newcomer
  • *
  • Posts: 2
Re: Windows 7 x64 Permission Denied: Different Symptoms
« Reply #3 on: October 30, 2012, 04:23:56 pm »
I might have finally found the answer! After trial and error and frustration and loss of hair and thinking what programs or services would possibly use the file instantly after creation, I disabled Windows Search -service. I've been able to recompile constantly after that, with nearly no time at all between compiles.

Being an administrator didn't help at all, but starting services.msc and disabling and stopping Windows Search service worked! I tried to make sure that it was indeed Windows Search that was the culprit in the end, but now the problem doesn't seem surface at all again after starting the service. I'm starting to really hate this problem.

Offline fireguyjeff

  • Single posting newcomer
  • *
  • Posts: 2
Re: Windows 7 x64 Permission Denied: Different Symptoms
« Reply #4 on: November 09, 2013, 11:49:55 pm »
@ZodiacMentor
I have spent many hours struggling with the Permission Denied problem in Win7
I followed your lead and disabled Windows Search and the problem is solved!!
An added bonus is that the compile and link all run much faster.
I also had Permission Denied when trying to run the .exe directly.
That problem is also resolved with your Windows Search disable.
You ROCK!!
Many MANY thanks for posting this fix.


Offline fireguyjeff

  • Single posting newcomer
  • *
  • Posts: 2
Re: Windows 7 x64 Permission Denied: Different Symptoms
« Reply #5 on: November 10, 2013, 01:54:07 am »
@Zodiac
ARRRGGHHH!
The problem was solved for about an hour.
Ran many compiles and runs without a problem.
Now this Permission Denied problem is back, though intermittently.

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Windows 7 x64 Permission Denied: Different Symptoms
« Reply #6 on: November 10, 2013, 03:37:04 am »
Are you sure it's not related with your antivirus software if any?