Gavin
Gavin

Reputation: 1

Unable to execute ./sh file

I created an shell script which will ask user an input and provide result based on that input. I have given (711) permission and assigned owner as (root:test) to that file.

I have one user gavin whos secondary group membership is of (test), still user gavin is not able to execute the file. Please tell me what else need to be done ?

Basically i want a non root user (gavin) to just execute the file and not (read,write).

Upvotes: 0

Views: 404

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798744

Script files must be readable in order to be executed, since the interpreter must read them. Making them executable only allows them to be invoked directly without specifying the interpreter (which the shebang line does).

Upvotes: 2

Related Questions