PDA

View Full Version : [ubuntu] problems setting up execute permision to a file



puigar
July 9th, 2012, 06:07 PM
Hi,

I have installed Ubuntu 11.10 recently to my computer in order to use fortran 90.
I have installed succesfully gfortran compiler but it seems that I cannot execute the output that comes out from the compilation. it is a "a.out" file and the matter is that I amb not capable to change the permision of the executable. I cannot do it with the graphic interface and neither with command line.

when I do it with "chmod +x a.out", I just type enter and it reads the command correctly. but when I look with ll -l it does not appear the "x" on the rights of the file...

Why is this happening??

Thanks in advanced

Albert

NikTh
July 9th, 2012, 06:41 PM
Maybe you must change the owner . I am not sure but try it.. \

chown yourusername:yourusername a.out
Its possible to not let you , if not then run with sudo .

Then you can try to change again the execution rights with chmod.

SeijiSensei
July 9th, 2012, 07:48 PM
You need to use sudo if you're not the owner of the a.out file:


sudo chmod a+x /path/to/a.out

spjackson
July 9th, 2012, 09:01 PM
when I do it with "chmod +x a.out", I just type enter and it reads the command correctly. but when I look with ll -l it does not appear the "x" on the rights of the file...

Why is this happening??

Is a.out located on a non-linux filesystem, e.g. a FAT32 USB flash drive? If so, try building on a linux partition instead.

puigar
July 11th, 2012, 11:48 AM
it is located in a ntfs partition... and actually this was the problem.


So it is not possible in any way to execute any file in a ntfs partition????

I try to put the executable permission on the linux partition, but the executable right disapears when it is copied in the ntfs partition.

spjackson
July 11th, 2012, 01:55 PM
it is located in a ntfs partition... and actually this was the problem.


So it is not possible in any way to execute any file in a ntfs partition????

I try to put the executable permission on the linux partition, but the executable right disapears when it is copied in the ntfs partition.
It is possible, but it is not straight-forward. There are options to specify when the partition is mounted. If you search the forums for ntfs and execute, you will find lots of answers.

I have never found the need to do this, so I am sketchy about the details.

puigar
July 11th, 2012, 06:00 PM
thanks, I have managed to set up executable files for the device at the fstab file. even I do not what I have really done it worked eventually.

Thanks!