Author Topic: windows 7 "permission denied" problem  (Read 115330 times)


  • Guest
Re: windows 7 "permission denied" problem
« Reply #30 on: November 01, 2011, 09:17:31 am »
I had this, and as you say it is definitely not a CB problem. I tracked my problems down to a ropey firewall (not AV) installation - completely deleting all firewall software and then re-installing the firewall fixed it for me.


  • Guest
Re: windows 7 "permission denied" problem
« Reply #31 on: December 21, 2011, 03:59:55 pm »
I had run into the same problem, and was searching Google for a solution when I stumbled upon this site. I tried following some of the solutions here, but I suppose they weren't for me (This is not to say, however, that any of these other solutions shouldn't be tried).

I managed to fix this problem in what I guess was a simple but unorthodox way. I figured out that the root of the problem was coming from when C::B makes a folder for the project and its files wherever you want it to. For some reason, the folders which C::B makes are automatically locked, for lack of a better word (this happens on my computer at least). So, I wanted to repeat the actual project-making process and delete the locked file.

Before I go on any further, I just wanted to clarify this; I was unable to access the project folder form Windows Explorer, nor was I able to change the permissions of the folder when I accessed it via one of C::B's browsing utilities.

Since C::B can apparently open and access the file just fine (and thus can open/delete/rename it), I deleted the file from where I had C::B create it; however, after I sent it to the Recycle Bin, I wanted to check something first before I tried to make a whole new project. Since all I essentially did was just move the folder which contained the project from one place to another, I wanted to see if I could see the folder in Recycle Bin. As it turned out, when I opened Recycle Bin and looked for the folder, there it was; I was able to open it and see it just fine. Intrigued, I restored the folder to see if it retained this state.

To my luck, it did. I was now able to open and edit and do whatever I wanted to the project folder, even from Windows Explorer. I opened the project file in C::B and tried to build it, and it worked! I tried building multiple times with success, and tried changing something and building it again, with success. I thought I would share this with you all to help anyone else who had this problem and also to let the experts on C::B examine this to determine whether or not it was truly a success.

Regardless of whatever, have a good day!


  • Guest
Re: windows 7 "permission denied" problem
« Reply #32 on: November 15, 2012, 05:45:59 pm »
Found this pearl here : which solved this most annoying problem for me (windows 7, executable not removable but not running either, looking like some kind of phantom-permissions problem).

This post suggests to reactivate a windows service called "Application Experience"

Offline Rookie

  • Single posting newcomer
  • *
  • Posts: 2
Re: windows 7 "permission denied" problem
« Reply #33 on: November 16, 2012, 03:32:09 pm »
This may be helpful...

I have been pulling my hair out for days over the "Permission Denied". I have eliminated all the usual suspects: Windows Experience, Windows Search, Folder/File Permissions, UAC...

This was the behaviour I was getting compiling Code::Blocks-wx2.8.x:

* Several of the low-level projects were built (exchndl, tinyXML etc), and the output folder was filling up with objects (thus ruling out most of the usual suspects above).
* When CB hit wxpropgrid, wxpropgrid.dll made a brief appearance in the output folder and then vanished! Ultimately, CB gave the "Permission Denied" message.
* Procmon (SysInternals) showed that ld.exe has created and then deleted the dll! As the file briefly appeared, it was not a proper permission denied.
* collect2.exe then failed to find the dll resulting in the extremely frustrating "Permission Denied".

This shows that ld.exe is not happy about something and deleting the output, causing the rest of the process to trip over itself!
Manually running the command line showed some extraneous folders, and I finally traced the problem:

Project -> Build Options... -> wxpropgrid (fill in your problem project here) -> Linker Settings -> Link Libraries

I had inadvertently listed a directory, not a file!!! I had meant to add the folder to the linker search list!

Now the error makes sense: ld.exe could not find the library (since it was a folder), but unfortunately emitted "Permission Denied" instead of "Library ... not found"

Suggestion to CB: Check that files are files (and paths are paths) in the settings dialogs - I am sure this will save a massive amount of frustration!

The moment I fixed this, voila! everything compiled perfectly!

PS: This is not a CB problem (as has been pointed out numerous times), nor is it a Windows problem (my favourite suspect). But, CB helps you shoot your foot off by not telling you that your entry to a dialog is not a file.


  • Guest
Re: windows 7 "permission denied" problem
« Reply #34 on: January 23, 2015, 12:49:34 am »
ok problem is solved when i reinstalled the codeblocks it's now working fine.

i thing that access denied problem was because i mixed the nightly build with the original codeblocks program files (i am stupid  :roll:).

anyway case is closed.

Thank you so much! I was having this same exact problem. Solved for me too! lol ;D