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.

5
  • 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 3, 2013 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 3, 2013 at 19:59
  • You need to run it as root - sudo chmod +x (a little X by the way).
    – Wilf
    Nov 3, 2013 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 4, 2013 at 3:55
  • youtube.com/watch?v=Rey7mircX1k
    – Pixdigit
    Nov 4, 2013 at 16:49

1 Answer 1

2

You cant change executable bit on fat systems.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .