7

I have created an Eclipse Workspace on a mounted partition of my hard drive. I am able to successfully build the hello world program but when I try to execute the runnable I get the following error message:

Error starting process. Exec_tty error:Cannot run program
"/media/vineet/DEVDATA1/vinexpMount/Debug/vinExpeMount": Unknown
 reason Exec_tty error:Cannot run program
"/media/vineet/DEVDATA1/vinexpMount/Debug/vinExpeMount": Unknown
reason Exec_tty error:Cannot run program
"/media/vineet/DEVDATA1/vinexpMount/Debug/vinExpeMount": Unknown
 reason

Please tell what shall I do ? I have checked the permissions for the executable which is

-rw-r--r--

which means that I have not got the permission to execute. but when I create a workspace in root partition, I get the execute permission by default. what Shall I do to get the same behaviour here?

3
  • I think you have to mention how are you executing the program.
    – Raja G
    Jan 2, 2013 at 16:31
  • there is run option in eclipse. I am using the same
    – bubble
    Jan 2, 2013 at 16:32
  • I am finally able run executable by providing the following flags while mounting fmask=0000,dmask=0000,uid=1000,gid=1000,rw,exec however still stuck on the next step: askubuntu.com/questions/235700/…
    – bubble
    Jan 3, 2013 at 16:18

3 Answers 3

8

This ought to be a comment, but it seems that I don't have the privilege to write any, so sorry in advance.

Have you tried to execute the mount command in terminal? This program produces output for every mount point in your system. At the end of every line in the output, the mount flags are listed in parentheses. Check if your mount point has noexec flag set.

If so, you can change it with the following command (for example assuming your drive is mounted in /mnt/cdrom):

sudo mount -o remount,exec /mnt/cdrom

If your mounted drive is a Windows partition (i.e. a partition formatted with NTFS filesystem), then you can mount it executable as described in this post.

1
  • these are the flags which I get type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)
    – bubble
    Jan 3, 2013 at 13:56
1

You can use the Linux linker to run any file regardless of executable permissions and without changing the mount options like so:

/lib/ld-linux.so.2 /path/to/binary-file

or, on 64 bit systems:

/lib64/ld-linux-x86-64.so.2 /path/to/binary-file

1

My solution is remount it to another path:

$ sudo umount /dev/sdf
$ sudo mount -o exec,defaults,-default_permissions /dev/sdf ~/usbdrive

List all mounted drive:

$ cat /proc/mounts

You must log in to answer this question.

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