Is bash being bipolar? Permission allowed, then denied
I'm sure this question comes up a lot, but I'm particularly confused in this situation.
I can run my program once, just fine. However, if I try to run it again without recompiling, bash refuses to give me permission. I have a small idea why, but I don't think think I'm right.
Here's what I'm doing (for a course assignment). I have a program that has to change itself during runtime. The easiest way I thought to do this would be to to add blank lines to the executable, by creating a file with a few "\n" in them, and then concatenating them using a system call. It works! But only once.
However, if I manually go through and add a new line to the .exe and run it, it never stops me. I don't need to recompile...which is weird.
My thought was that maybe bash thinks I'm up to something...and wants to stop it, which also is understandable. However, I'm just doing my homework, so I hope this isn't the case.
Could anyone shed some light on this matter? Does changing the executable, even if it doesn't hinder its ability to run, cause some problem or issue with permissions?
|