2

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 Answers2

2

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

$ head -n 1 configure
#!/bin/bash
$ 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.

Roman Riabenko
  • 2,145
  • 3
  • 15
  • 39
0

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
Reda Salih
  • 1,724
  • 4
  • 9
  • 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 Nov 13 '20 at 05:37
  • Yes thanks i see ! – Reda Salih Nov 13 '20 at 11:51