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

Offline websnake

  • Multiple posting newcomer
  • *
  • Posts: 22
windows 7 "permission denied" problem
« on: July 26, 2011, 09:43:55 pm »
when i compile any program it executes 2 or 3 times fine but after that C::B gives me error when i compile it again it gives me error....

ld.exe||cannot open output file C:\Users\username\Documents\Codeblocks\del it .exe Permission denied

and when i restart C::B then it works fine but again after compiling program 1 or 2 time again it says "permission denied".

i am facing this problem from past few days.

more info:-
OS - window 7 ultimate
C::B - SVN 7075
status - i don't have girlfriend  :(

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9693
Re: windows 7 "permission denied" problem
« Reply #1 on: July 26, 2011, 09:55:34 pm »
i am facing this problem from past few days.
This sounds to me like either a non-stopping application (i.e. it remains in memory after closing) or an issue with an AntiVirus (/defense) software that does not free it's handle to the executable.

You can try:
- inspect the running processes in your task manager to see if the app closed properly
- disable your AV / defense software temporarily, see if the problem is gone
- use a tool like process explorer (from sysinternals), search for the handle of your application and see which (other) process gained a handle to it

Note that this is 99.9% not an issue with Code::Blocks, but with the system.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline websnake

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: windows 7 "permission denied" problem
« Reply #2 on: July 26, 2011, 10:27:59 pm »
i tried first two methods i turned my antivirus off and also checked process list but i found nothing.

but i noticed that after executing the program and after when i get permission denied error when i wait 1 or 2 minutes i can execute it again without any error.

i will try process explorer. may be i am missing something :? .

Offline ouch

  • Almost regular
  • **
  • Posts: 223
Re: windows 7 "permission denied" problem
« Reply #3 on: July 26, 2011, 10:32:59 pm »
it could also be a loop running in your program. just because you pushed that x to close it doesn't mean your app kills it's self mid process.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9693
Re: windows 7 "permission denied" problem
« Reply #4 on: July 27, 2011, 07:10:17 am »
it could also be a loop running in your program. just because you pushed that x to close it doesn't mean your app kills it's self mid process.
Yes, but then it should appear in the task manager which isn't the case:
- inspect the running processes in your task manager to see if the app closed properly
i tried first two methods i turned my antivirus off and also checked process list but i found nothing.
« Last Edit: July 27, 2011, 07:12:07 am by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

zabzonk

  • Guest
Re: windows 7 "permission denied" problem
« Reply #5 on: July 27, 2011, 09:22:56 am »
I've had exactly the same problem. It happened when I switched firewall implementations and I only solved it by expunging all traces of both firewalls and then reinstalling one from scratch. So I would look again at it being a problem with your AV/firewall software. In any case, I doubt it is a CB problem - I bet you will get the same thing happening when you compile from the command line.
« Last Edit: July 27, 2011, 09:25:17 am by Neil Butterworth »

Offline websnake

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: windows 7 "permission denied" problem
« Reply #6 on: July 27, 2011, 04:00:46 pm »
anyone help please this is killing me still getting those "permission denied" errors.

any idea any way i can code properly without this errors it's slowing me down a lot and forcing me to try something else(which i don't want).

zabzonk

  • Guest
Re: windows 7 "permission denied" problem
« Reply #7 on: July 27, 2011, 04:37:02 pm »
Have you tried compiling from the command line? Do you get the same errors? If so, it isn't a CB problem and you should look elsewhere for a solution.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9693
Re: windows 7 "permission denied" problem
« Reply #8 on: July 27, 2011, 04:51:31 pm »
anyone help please this is killing me still getting those "permission denied" errors.

any idea any way i can code properly without this errors it's slowing me down a lot and forcing me to try something else(which i don't want).
All I can tell is that this is certainly not a C::B issue. Why that happens extremely depends on your system and used software. It is uncertain that you can get an any more help from the Code::Blocks community therefore.

Sorry.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline websnake

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: windows 7 "permission denied" problem
« Reply #9 on: July 27, 2011, 05:21:58 pm »
anyone help please this is killing me still getting those "permission denied" errors.

any idea any way i can code properly without this errors it's slowing me down a lot and forcing me to try something else(which i don't want).
All I can tell is that this is certainly not a C::B issue. Why that happens extremely depends on your system and used software. It is uncertain that you can get an any more help from the Code::Blocks community therefore.

Sorry.

ok
BTW thanks everyone for suggestions.

Offline websnake

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: windows 7 "permission denied" problem
« Reply #10 on: August 31, 2011, 09:00:25 pm »
i asked on windows forums but they are saying that....
"you should ask this question form codeblocks devs"

so i am back here repeating the same question again (i hope i will get some help this time).

and here is the prof of my problem.

http://www.youtube.com/watch?v=Q7_0GG1qLJg

please turn the annotations on and watch in HD.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: windows 7 "permission denied" problem
« Reply #11 on: August 31, 2011, 09:59:02 pm »
You can try to rename the exe to delit.exe, not del it.exe.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline websnake

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: windows 7 "permission denied" problem
« Reply #12 on: August 31, 2011, 10:26:53 pm »
You can try to rename the exe to delit.exe, not del it.exe.

that doesn't work.  :?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7683
    • My Best Post
Re: windows 7 "permission denied" problem
« Reply #13 on: September 01, 2011, 01:10:09 am »
Have you tried compiling from the command line? Do you get the same errors? If so, it isn't a CB problem and you should look elsewhere for a solution.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline websnake

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: windows 7 "permission denied" problem
« Reply #14 on: September 01, 2011, 05:24:12 pm »
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.