Is it possible to have execute permissions without read permissions?

Is it possible to have execute permissions without read permissions?

Post by Iain Brow » Fri, 21 Jun 2002 23:18:31



Does anyone know if it is possible to give a user execute permissions on a
file, but not to let them read what is contained within that file?

The case in question is a script with contains some sensitive data
(password) is required to be run by another user, but I don't want them to
see the text in the file. I have searched for information, but only seem to
have turned up details about directories which can be changed to but the
contents cannot be read.

I have tried suid but it still doesn't seem to work.

Any suggestions would be gratefully accepted.

Cheers,

Iain.

 
 
 

Is it possible to have execute permissions without read permissions?

Post by Paul Kimot » Sat, 22 Jun 2002 00:16:19



> Does anyone know if it is possible to give a user execute permissions on a
> file, but not to let them read what is contained within that file?

Yes ...

Quote:> The case in question is a script

... but not with a script: the interpreter must read the script (with
whatever permissions the user has).

Quote:> I have tried suid but it still doesn't seem to work.

The setuid bit is ignored on scripts, for good security reasons.  If you
really want to, you can write a little setuid C wrapper to invoke the
script.

--
Paul Kimoto
This message was originally posted on Usenet in plain text.  Any images,
hyperlinks, or the like shown here have been added without my consent,
and may be a violation of international copyright law.

 
 
 

Is it possible to have execute permissions without read permissions?

Post by Ken Parke » Sat, 22 Jun 2002 06:14:26



>Does anyone know if it is possible to give a user execute permissions on a
>file, but not to let them read what is contained within that file?

>The case in question is a script with contains some sensitive data
>(password) is required to be run by another user, but I don't want them to
>see the text in the file. I have searched for information, but only seem to
>have turned up details about directories which can be changed to but the
>contents cannot be read.

>I have tried suid but it still doesn't seem to work.

>Any suggestions would be gratefully accepted.

>Cheers,

>Iain.

Hi Iain,
             chmod u+x  file    ought to work.    Have a look at    info chmod.
Ken.