[comp.os.minix] Is the X bit enough to exec the file?

Leisner.Henr@xerox.com (marty) (03/08/88)

I've notices some strange behavior execing programs.  I wonder is  this the way
Minix is designed, a bug in my own Minix version or something to be fixed.

It seems if the user does not have permission to read the file, he cannot
execute it.

On Unix, setting permissions to --x--x--x allows everyone to execute the
program.
On the Minix I'm running, it is necessary to have r-x permission to execute.
Since the mm is actually opening the file to be exec as O_READONLY, if there is
no read permission on the file, I don't see any special code to allow it be open
to be read.  
mm/utility/allowed() just tries to open the file to be execed.  Since the file
isn't readable, fs turns it down.

Am I missing something or is this the design (r-w is necessary to exec)?

marty
ARPA:	leisner.henr@xerox.com
GV:  leisner.henr
NS:  martin leisner:henr801c:xerox
UUCP:  nsc!nscimg!amps!marty

ast@cs.vu.nl (Andy Tanenbaum) (03/09/88)

In article <1408@louie.udel.EDU> Leisner.Henr@xerox.com (marty) writes:
>I've notices some strange behavior execing programs.  I wonder is  this the way
>Minix is designed, a bug in my own Minix version or something to be fixed.
>
>It seems if the user does not have permission to read the file, he cannot
>execute it.
>

It may well be a bug.  It is sort of clear how it happened.  MM tries to
read the file.

Andy Tanenbaum (ast@cs.vu.nl)