At 00:16 +0100 10/14/03, Alan Fry wrote:
>       do shell script "/Users/alanfry/Desktop/backatcha.pl"
>results in the error:
>       ...backatcha.pl:perl:bad interpreter:Permission denied

do shell script is misnamed as are a lot of other commands in AppleScript.  What it 
really means is

Tell the OS to execute something that has been flagged as executable by setting the x 
bit in its permissions for the user who is making the request.

It doesn't matter whether the file pointed to is a shell script or not though 
AppleScript does invoke the bash shell to manage the execution and can accept bash 
commands directly. Compiled C code and perl scripts with a #! line are equally 
executable but you must set that x bit. The failure you report is that you didn't have 
execute permission.

Terminal is the easy way. The command is

chmod  777 path_to_file

which actually opens it up completely to anyone. The rightmost bit in each octal digit 
is the x bit for user, group, and world.  man chmod for more.

It would be nice if Finder allowed access to the x bit but it doesn't. It would be 
nice if Finder would execute a double-clicked file with the x bit set but. . . Steve?  
  Is it possible to write an AppleScript to do that?

-- 
-->  There are 10 kinds of people:  those who understand binary, and those who don't 
<--

Reply via email to