T
Termux•6mo ago
Bonjour

Bash: Permission Denied

Hello! 🤗 When I run the following commands (the responses termux gives are also written btw) I get an annoying error:
cd /storage/emulated/0/Coding/C/
clang HelloWorld.c -o Hi
ls
Termux: HelloWorld.c Hi
./Hi
bash: ./Hi: Permission Denied
---------------------------------------- C Code in HelloWorld.c:
include <stdio.h>
int main(){

printf("I\nlike\n\nPizza\n&\nC-ProgragmmingLanguage>

return 0;

}
include <stdio.h>
int main(){

printf("I\nlike\n\nPizza\n&\nC-ProgragmmingLanguage>

return 0;

}
---------------------------------------- I have tried using: chmod +x Hi chmod u+x Hi termux-setup-storage ,but none of these work. Can someone please help me? & thanks in advance.
Solution:
Not a bug. Android does not allow executables on shared storage and sdcard. Use termux's home folder for such things.
Jump to solution
10 Replies
Solution
twaik
twaik•6mo ago
Not a bug. Android does not allow executables on shared storage and sdcard. Use termux's home folder for such things.
Bonjour
BonjourOP•6mo ago
Isn't it in the data folder?
twaik
twaik•6mo ago
/storage/emulated/0 is a shared storage.
Bonjour
BonjourOP•6mo ago
inside a file with a name similar to com.termux or something? oh
twaik
twaik•6mo ago
/data/data/com.termux/files/home is termux's home folder.
Bonjour
BonjourOP•6mo ago
how do I move it there tho? is there a command for it? cuz I am not used much to the linux cmd yet (still learning)
twaik
twaik•6mo ago
mv.
Bonjour
BonjourOP•6mo ago
oh thx wait lemme try still says permission denied. I used:
mv Hi /data/data/com.termux/files/home
cd /data/data/com.termux/files/home
ls ./Hi
twaik
twaik•6mo ago
Do chmod +x Hi...
Bonjour
BonjourOP•6mo ago
it worked! tysm
Want results from more Discord servers?
Add your server