1

I have written an c++ program ,but cant run it because the executable bit is not on yes. So I wanted to change it ,but it only changes it for a second and then swiches back.

Pixdigit
  • 155
  • 1
  • 4
  • 17
  • If you have written a C program, you need to compile it using gcc or something before running it. If you then need to make it executable, run chmod +X /PATH/TO/FILE to make it executable (Another way is to open the file's properties window, and click yes to 'Allow executing the file as a program'). Then you should be able to run in it terminal by running /PATH/TO/FILE. – Wilf Nov 03 '13 at 14:36
  • alrady compiled ,but if i do chmod +X ... the executable bit is still off (by the way ,i know how to change ,the problem is if i mark allow executing the file as programm it marks it for about a half second and than swiches back. – Pixdigit Nov 03 '13 at 19:59
  • You need to run it as root - sudo chmod +x (a little X by the way). – Wilf Nov 03 '13 at 21:12
  • hmm..when in my home folder, sudo is never needed with chmod. Also if I compile a c-source with gcc, the resulting binary always has the executable bit set automagically. Something fishy is going on here. – thom Nov 04 '13 at 03:55
  • http://www.youtube.com/watch?v=Rey7mircX1k – Pixdigit Nov 04 '13 at 16:49

1 Answers1

2

You cant change executable bit on fat systems.

Pixdigit
  • 155
  • 1
  • 4
  • 17