0

I am aware similar questions have been asked before but none of these have solved the issue I have:

I have built a very basic Unity3d program for linux but when trying to run the resulting executable I get an 'open with...' where there are no recommended applications if I double click the file in the GUI or 'Permission denied' if running through the terminal.

I have ensured the 'allow this file to run as executable' is checked and tried chmod u+x before running from the terminal.

The file extension is x86_64. My understanding is that this is 64 bit binary and my system is also 64 bit (I checked using uname -a).

If it's any help my system is running Ubuntu 12.04 LTS (xfce) on an Acer Chromebook 14, installed using crouton.

I am completely new to all things linux so please say if I have missed out any important information and please explain answers in such a way a newbie can understand.

Thanks in advance to everyone!

Revilo
  • 3
  • 1
  • 3
  • 1
    So you get permission denied in a terminal? What's the output of `file name-of-your-file` and `ls -l name-of-your-file` (replace name-of-your-file with the actual name)? – Zanna Oct 24 '16 at 08:41
  • The output of file name-of-file is: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x9ad66801b4ae670b984dc7b85f245b9e0aea13d9, stripped. the output of ls -l name-of-file is: -rwxr-xr-x 1 revilo revilo 24144504 Oct 23 13:31 – Revilo Oct 24 '16 at 09:01
  • and... the output of `ls -l name-of-your-file` is? – Zanna Oct 24 '16 at 09:38
  • apologies - i accidentally submitted the comment but thought I edited it to add that in. The output is: -rwxr-xr-x 1 revilo revilo 24144504 Oct 23 13:31 – Revilo Oct 24 '16 at 09:48
  • 2
    This question belongs on http://unix.stackexchange.com but is off topic here on askubuntu. You will find other crouton users to help you there. – mchid Oct 24 '16 at 11:10
  • @Revilo Just a suggestion, have you tried chown? – negusp Oct 24 '16 at 12:33
  • I have not yet tried chown (change owner?); how might I use this to help (I am the only user of my system; does that mean there is only one owner and thus nothing to change from/to?) – Revilo Oct 24 '16 at 12:38
  • 1
    Definitely sounds like something crouton-specific to me (possibly the filesystem in question is mounted with the `noexec` option?) – steeldriver Oct 24 '16 at 12:59
  • As per the comments to the answer below, it does appear to be something to do with noexec on the USB drive; is this still likely to be crouton specific? If not, how might this be solved if it is causing the issue? – Revilo Oct 24 '16 at 13:28
  • @mchid whilst I am using a chromebook to run Ubuntu, it seems the problem was not chromebook or crouton specific after all as Leo Kim's suggestion worked, thus to me does not seem off-topic. Please correct me if I am wrong here but if not, could you please let me know why this question has been put on hold so that I may avoid asking inappropriate questions in the future. Thanks! – Revilo Oct 25 '16 at 19:33
  • @Revilo The version of Ubuntu is not an official version of Ubuntu and so this question, even though it *is sort of technically* about Ubuntu, it does not fit the guidelines of the "askubuntu" stack exchange site (askubuntu.com). However, your question *is* on topic at the proper stack exchange website, unix.stackexchange.com . The fact that a question is or is not crouton actually has nothing to do with the fact that this question is still off topic. There are all sorts of linux questions that *could* be answered on askubuntu that are off topic because in use on a non official release. – mchid Oct 27 '16 at 05:24
  • see here: http://askubuntu.com/a/366267/167115 and here: http://askubuntu.com/questions/356243/true-ubuntu-on-chromebook-arm-samsung – mchid Oct 27 '16 at 05:34
  • This is from the README.md file at https://github.com/dnschneid/crouton/blob/0cac566a7fe7da6052682762860176d2c1420080/README.md#whats-a-chroot "you are not booting a second OS; instead, the guest OS is running using the Chromium OS system . . . the downside is that you must be running the correct chroot for your hardware, the software *must be compatible with Chromium OS's kernel*, and machine resources are inextricably tied between the host Chromium OS and the guest OS." – mchid Oct 27 '16 at 06:16
  • Ah, thank's for the clarification. I'll sign up to the other stackexchange site and try there for similar issues in future. Thanks again everyone for the help anyway! – Revilo Oct 27 '16 at 18:40

1 Answers1

3

Where is this executable file located at? If it is on a mounted partition, there could be a chance that noexec flag is set. Check to see if your workspace is under mounted drives.

$ mount | grep noexec
leoybkim
  • 171
  • 5
  • The executable is saved to a USB flash drive. If this is the problem, is there a way it can be solved without moving the file to the computer's hard drive? When I type mount | grep noexec into the command line, in the output 'noexec' appears in red a number of times. If it would be helpful I can paste the whole output as an answer below? – Revilo Oct 24 '16 at 10:56
  • Just tried copying the folder containing the executable from the USB to my documents and it runs fine from there. Is there a way to make it run on the USB? Since I am using a Chromebook, there is not a great deal of internal storage so it is very useful having things like this saved externally. – Revilo Oct 24 '16 at 11:00
  • 2
    You can try to remount it with `exec`. Try `sudo mount -o remount,exec /path/to/usb/` – leoybkim Oct 24 '16 at 16:24
  • Brilliant! That's done the trick, thanks a lot to everyone for the help! – Revilo Oct 24 '16 at 22:32