Permission denied running my own program on Linux?

csiz picture csiz · Jun 17, 2009 · Viewed 51.1k times · Source

I have Ubuntu 9.4. I've built the program, some basic OpenGL. The program just makes a rotating square. Then run it and:

sh: /blabla permission denied.

And an empty main doesn't work:

int main()
{
    return 0;
}

How can I make that disappear?

Answer

Przemyslaw Zych picture Przemyslaw Zych · Feb 17, 2010

I had the same problem and it appeared that my partition was mounted as noexec cat /etc/mtab

When I configured options in /etc/fstab I wrote exec,user but it appears that "user" option by default sets up "noexec". When I changed the order of these two to user,exec everything went back to normal!

Hope it helps.