View previous topic :: View next topic |
Author |
Message |
Aries-Belgium l33t


Joined: 08 Jul 2005 Posts: 730 Location: Willebroek, Belgium
|
Posted: Wed Sep 21, 2005 2:00 pm Post subject: [G++] Can't execute a selfmade program [SOLVED] |
|
|
Hi, I've got a really strange problem.
I created a program from a tutorial:
Code: | #include <iostream>
using namespace std;
int main(){
cout << "hello";
return 0;
} |
They said I have to compile it with G++:
Code: | g++ -o test test.cpp |
Okay so far so good, it compiles without getting errors and it outputs the file "test".
Now the strange part. When I want to execute the the file with "./test" it sais "bash: ./test: Permission denied".
Even with root I get the same error. I just followed the tutorial I found on the Internet, so I guess this have to work ...
Any ideas?
Last edited by Aries-Belgium on Wed Sep 21, 2005 2:21 pm; edited 1 time in total |
|
Back to top |
|
 |
skunk l33t


Joined: 28 May 2003 Posts: 646 Location: granada, spain
|
Posted: Wed Sep 21, 2005 2:13 pm Post subject: |
|
|
the filesystem where resides test is probably mounted noexec, remount it with exec (man mount) |
|
Back to top |
|
 |
Aries-Belgium l33t


Joined: 08 Jul 2005 Posts: 730 Location: Willebroek, Belgium
|
Posted: Wed Sep 21, 2005 2:21 pm Post subject: |
|
|
skunk wrote: | the filesystem where resides test is probably mounted noexec, remount it with exec (man mount) |
Jep, that was the problem. Thanks!!! |
|
Back to top |
|
 |
|