How to run Linux script e.g configure etc, in FAT (or alike raw) filesystem ?

$ sudo chmod -R 777 .
$ ./configure
bash: ./configure: Permission denied

How to solve ?


2 Answers 2


Assuming it is a shell script, manually passing it to the relevant binary should let you run it:

$ head -n 1 configure
$ bash configure

FAT does not support individual file permissions. So you cannot assign one with chmod. Though, it should be possible to configure to treat all files in a FAT as executable.


You have to set the execute permissions on the script path not the current directory path (.) :

sudo chmod 777 configure

Then execute it :

sh configure
  • You don't need to do sh configure to execute the script at that point - in fact, it only works if configure is a shell script (the OP only mentioned that it is a "script", not necessarily a "shell script" - e.g., if it's instead a Perl or Python script, running it with sh doesn't work). In that case, just run ./configure as the OP originally did, after fixing the permissions as you mentioned.
    – patbarron
    Commented Nov 13, 2020 at 5:37
  • Yes thanks i see !
    – Reda Salih
    Commented Nov 13, 2020 at 11:51

You must log in to answer this question.