I want to execute a script file from terminal but it shows error
root@silambarasan-PC:/media/D-DEVELOPME/androidSdk/adt-bundle-linux-x86/sdk/tools# ./android
-bash: ./android: Permission denied`
so I saw the file permissions from terminal & tried to give execute permission. but no use even I give permission it won't change.
root@silambarasan-PC:/media/D-DEVELOPME/androidSdk/adt-bundle-linux-x86/sdk/tools# ll android
-rw-r--r-- 1 silambarasan silambarasan 3498 Dec 6 08:14 android
root@silambarasan-PC:/media/D-DEVELOPME/androidSdk/adt-bundle-linux-x86/sdk/tools# chmod 777 android
root@silambarasan-PC:/media/D-DEVELOPME/androidSdk/adt-bundle-linux-x86/sdk/tools# ll android
-rw-r--r-- 1 silambarasan silambarasan 3498 Dec 6 08:14 android`
I don't know what to do.
Thank you.
Easiest would be to copy the executable to your home folder and start it from there.
But…
It seems your executable is mounted on an external partition. Make sure the partition is not mounted with
noexec
. Try:If you see a line containing the word "noexec", try re-mounting the partition without the
noexec
flag:Also make sure your media actually allows you to change the permissions, e.g. you cannot do that on a mounted CD or an SD crad with the read-only switch on.
Instead of
chmod 777 file
, you may usechmod u+x file
. Whereu
means user andx
means execution permissons. Seeman chmod
pages for more information. I know that 777 gives all permisson for read, write execute for user, group and others, try using the syntax with u+x.