After some (preliminary) testing, it appears to me that this is not a bug with the ubuntu-terminal-app, but is instead to do with not being allowed to launch executable files from within the home directory. That's why
bash /path/to/file worked, but
/path/to/file didn't, because bash resides in
I have tried running a bash script, a python script, and a hello-world g++ compiled c++ program, all with the executable bit set, and none will run when in a subdirectory of
/home. None will run, whilst scripts and applications in other subdirectories of root run fine.
Unfortunately, I am yet to find a solution: there is nothing in
/etc/fstab to suggest
/home is mounted as
/userdata/user-data /home none bind 0 0
I have even tried remounting it explicitly as
mount -o remount,rw,exec /home to no avail. Will update if I find a solution.
So far the only workaround is to use an interpreter to run scripts (Bash/Python etc.) or
/lib/ld-linux-armhf.so.3 /path/to/file for binary applications.
Minor update: A slightly more elegant workaround is to move the script/application to another directory, such as
/opt, and then symlink to it. That way you can run it just by
/path/to/symlink. For example, you could do:
sudo mv /path/to/SCRIPT.sh /opt
ln -s /opt/SCRIPT.sh /path/to
Then you could just type
/path/to/SCRIPT.sh to run it.
UPDATE WITH SOLUTION
Found out the problem is to do with the apparmor security profile for the terminal app. See my question and answer here: Ubuntu touch – executable files won't launch in /home directory