Click to See Complete Forum and Search --> : Running executables


Mike Lewis
10-22-2005, 11:42 PM
I am trying to run a small program on my system's USB hard disk, but the system doesn't want me to.

Command line is normally: ./wgrib filename

The same program works on the permanent hard drives, and runs off the USB hard disk if I use HAL to automatically detect and mount the disk. SO... there must be something wrong with my /etc/fstab file (the one I use normally--since I don't normally use HAL).

My normal entry for the drive partition is: /dev/sda2 /mnt/usb2 auto user,noauto 0 0

I checked ownership and permissions as root... nothing looked unusual.

Thanks for any ideas.

Mike

je_fro
10-23-2005, 01:02 AM
Dickinson eh? You're just down the road....
Try adding exec to the options line in fstab?

/dev/sda2 /mnt/usb2 auto user,noauto,exec 0 0

DaijoubuKun
10-23-2005, 01:44 AM
I know this is usually obvious but just want to check. if the file actually executable? type 'ls -l' to see if it is. Usually a USB drive will be fat32, not a linux file system.

when you do ls -l you will see something like this at the beginning
rwxrw-rw --------- root root <file>

the first set of rwx (or the first 3 characters) are the permissions for the owner of the file, the second set if for group permissions, and third is every one else (if I'm not mistaken, but probabilly am) of it's not executable you can do a 'chmod' on the file.

ex. 'chmod 755 <file>'

like I said, I just want to make sure, it's a common mistake.

Sepero
10-23-2005, 09:04 AM
je_fro and DaijoubuKun are correct and one of their answers will likely solve the problem. Though, as a small chance, make sure the program is statically linked.