Compiled program won't execute

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

Compiled program won't execute

Postby navic on Wed Aug 15, 2012 8:56 am

When I compile anything with GCC the output executable will not set the executable permission - I've tried chmod +x filename and chmod 755 filename both have no effect on the file at all. This is happens only on removable drives... what am I doing wrong??
navic
Level 1
Level 1
 
Posts: 12
Joined: Fri Feb 13, 2009 9:42 am

Linux Mint is funded by ads and donations.
 

Re: Compiled program won't execute

Postby powerhouse on Wed Aug 15, 2012 11:21 am

It may be a permissions problem.

1. What's the format of the external drive? ext3 or ext4, or what?
2. Is your user (you) the owner of the drive?
3. Have a look here http://superuser.com/questions/57092/cant-change-permission-ownership-group-of-external-hard-drive-on-ubuntu

Good luck!
Asus Sabertooth X79 (NOT recommended), i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 SE2011 CPU cooler, Sapphire (AMD) 6450 GPU, PNY Quatro 2000 GPU, Sandisk Extreme 120GB SSD, WD 2TB WD20EARX HD, Corsair 500R case, SeaSonic 660W Gold X-Series PS
powerhouse
Level 4
Level 4
 
Posts: 370
Joined: Thu May 03, 2012 3:54 am

Compiled program won't execute

Postby animaguy on Wed Aug 15, 2012 11:28 am

Out of curiosity, what are some of the things you are trying to compile?
animaguy
Level 4
Level 4
 
Posts: 280
Joined: Wed Mar 14, 2012 4:04 pm

Re: Compiled program won't execute

Postby navic on Wed Aug 15, 2012 11:32 am

Thanks powerhouse. I am the owner of the drive and they are either NTFS or FAT volumes. The link you gave me says Linux doesn't support FAT permissions but these drives work fine in Mint 9 so I'll just stick with 9 until April and hope the next Mint LTS doesn't do this weird permission thing because I depend too much on being able to execute programs from NTFS/FAT volumes.
navic
Level 1
Level 1
 
Posts: 12
Joined: Fri Feb 13, 2009 9:42 am

Re: Compiled program won't execute

Postby navic on Wed Aug 15, 2012 11:33 am

animaguy wrote:Out of curiosity, what are some of the things you are trying to compile?


Hello world... it compiles fine and writes the output file but I can't get the execute permission to take effect
navic
Level 1
Level 1
 
Posts: 12
Joined: Fri Feb 13, 2009 9:42 am

Re: Compiled program won't execute

Postby marouane87 on Wed Aug 15, 2012 11:50 am

Hi :D
Are trying to follow some tutoriel? if so, can you share with us your source just to make sure you did everything alright :)
marouane87
Level 1
Level 1
 
Posts: 32
Joined: Sat Jun 23, 2012 7:37 am
Location: Tunisia

Re: Compiled program won't execute

Postby navic on Wed Aug 15, 2012 12:41 pm

marouane87 wrote:Hi :D
Are trying to follow some tutoriel? if so, can you share with us your source just to make sure you did everything alright :)


Nope, trying to understand the differences between Mint 9 and Min 13.... There are no source code problems, the only problem is that I can't make a file on a removable volume executable in Mint 13. The file doesn't matter if it's a hello world program I just compiled or an already compiled file that existed on the volume already.... none of them can become executable in Mint 13 only... all works fine in Mint 9.
navic
Level 1
Level 1
 
Posts: 12
Joined: Fri Feb 13, 2009 9:42 am

Re: Compiled program won't execute

Postby powerhouse on Wed Aug 15, 2012 5:52 pm

navic wrote:Thanks powerhouse. I am the owner of the drive and they are either NTFS or FAT volumes. The link you gave me says Linux doesn't support FAT permissions but these drives work fine in Mint 9 so I'll just stick with 9 until April and hope the next Mint LTS doesn't do this weird permission thing because I depend too much on being able to execute programs from NTFS/FAT volumes.


I don't think it's an issue with Mint 9, I have been using it since it came out. I don't have access to a Linux box now (I'm traveling with my Macbook) but somewhere in the back of my memory I recall some security or whatever settings that would disable you from executing files on external drives. Ah, did some searching and found this:

http://askubuntu.com/questions/5069/cant-set-permissions-for-files-on-an-ntfs-partition

It looks like Linux Mint or Ubuntu have, at some point of time, removed execute permission for external drives. The above link should help you to enable that. You can find more information when you Google for "can't set permissions for files on an ntfs partition".

Hope it works.
Asus Sabertooth X79 (NOT recommended), i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 SE2011 CPU cooler, Sapphire (AMD) 6450 GPU, PNY Quatro 2000 GPU, Sandisk Extreme 120GB SSD, WD 2TB WD20EARX HD, Corsair 500R case, SeaSonic 660W Gold X-Series PS
powerhouse
Level 4
Level 4
 
Posts: 370
Joined: Thu May 03, 2012 3:54 am

Re: Compiled program won't execute

Postby navic on Tue Aug 21, 2012 10:04 am

Thanks for link, it works but what a pain. Now that I think about my setup of running Linux on machines and using NTFS removable media in case someone needs to copy something onto a Windows machine is just dumb. I'm moving it all to the cloud and will pull down items to work on locally so I don't have to make this change on 10+ machines.

powerhouse wrote:
navic wrote:Thanks powerhouse. I am the owner of the drive and they are either NTFS or FAT volumes. The link you gave me says Linux doesn't support FAT permissions but these drives work fine in Mint 9 so I'll just stick with 9 until April and hope the next Mint LTS doesn't do this weird permission thing because I depend too much on being able to execute programs from NTFS/FAT volumes.


I don't think it's an issue with Mint 9, I have been using it since it came out. I don't have access to a Linux box now (I'm traveling with my Macbook) but somewhere in the back of my memory I recall some security or whatever settings that would disable you from executing files on external drives. Ah, did some searching and found this:

http://askubuntu.com/questions/5069/cant-set-permissions-for-files-on-an-ntfs-partition

It looks like Linux Mint or Ubuntu have, at some point of time, removed execute permission for external drives. The above link should help you to enable that. You can find more information when you Google for "can't set permissions for files on an ntfs partition".

Hope it works.
navic
Level 1
Level 1
 
Posts: 12
Joined: Fri Feb 13, 2009 9:42 am

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: Bing [Bot], Google Adsense [Bot], nunol and 17 guests