Friday, May 3, 2024
10
rated 0 times [  10] [ 0]  / answers: 1 / hits: 20412  / 1 Year ago, mon, february 6, 2023, 12:27:17

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.


More From » command-line

 Answers
3

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:



grep '/media/D-DEVELOPME' /etc/mtab | grep noexec


If you see a line containing the word "noexec", try re-mounting the partition without the noexec flag:



mount -o remount,exec /media/D-DEVELOPME


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.


[#32664] Tuesday, February 7, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
pilun

Total Points: 270
Total Questions: 100
Total Answers: 94

Location: England
Member since Sat, Feb 13, 2021
3 Years ago
;