Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am learning programming using the OpenGL and SDL library. Problem is, once the program is built, I can't run it.

(bash: ./nameOfMyProgram Permission denied)

I never had this problem with previous exercises, the files are mine, how could I run them properly?

Thank you for your help.

share|improve this question
This has not alot to do with ubuntu ;) – Rinzwind Apr 21 '12 at 14:24
Where is your pgm directory? If it is in in FAT/NTFS partion ,move it to home folder – Tachyons Apr 21 '12 at 14:25

chmod u+x ./nameOfMyProgram Set eXecute permissions to the file for the User.

share|improve this answer
Thank you, it helped for most of the exercises! – Oceane Apr 21 '12 at 20:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.