Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

keep a shell scripts from reading by others

1 view
Skip to first unread message

Peer Lu

unread,
Sep 3, 1999, 3:00:00 AM9/3/99
to
Dear All,

My OS is Solaris 2.5.1.

I wrote a shell script. Now I hope this shell script can be executed by
users in same group but can not be read and writen by them, so I set the
mode of this script to be 110 (__x__x___). But no one including me can
execute it, the error message is :"Permission deny". After I change its mode
to 550, it can be executed.

Does anyone know how to do this.

Thanks in advance.

Regards
Peer

Joe Durusau

unread,
Sep 3, 1999, 3:00:00 AM9/3/99
to
If they must execute it, they have to be able to write it. You need not
allow them to write it, however. If there is something secret about what it
does or how it works, you could convert it into a program that runs suid to
your account, and have that prog open another file that only you could read.

Speaking only for myself,

Joe Durusau

Peter Sundstrom

unread,
Sep 6, 1999, 3:00:00 AM9/6/99
to
Not so. Shell scripts need read permission in order for them to be run.

Joe Durusau wrote in message <37CFB38D...@delphi.com>...

Mason Ip

unread,
Sep 9, 1999, 3:00:00 AM9/9/99
to

>Peer Lu wrote:
>
>> Dear All,
>>
>> My OS is Solaris 2.5.1.
>>
>> I wrote a shell script. Now I hope this shell script can be executed by
>> users in same group but can not be read and writen by them, so I set the
>> mode of this script to be 110 (__x__x___). But no one including me can
>> execute it, the error message is :"Permission deny". After I change its mode
>> to 550, it can be executed.

Perhaps you can use shc (Shell [script] Compiler).
Shc converts a shell script to a binary so that the shell script content
is not readable.

ftp://ftp.fi.upm.es/pub/facultad/departamentos/datsi/frosal/shc-3.2.tgz
shc-3.2> tail -12 shc.README

Archived at: ftp://hpux.csc.liv.ac.uk/hpux/Languages/shc-2.4a
Archived by: st...@csc.liv.ac.uk

Author: Francisco Rosales Garcia
--------------------------------------------------------------------
Francisco Rosales García <fro...@fi.upm.es> TEL: +341 336 73 80
http://www.datsi.fi.upm.es/~frosal FAX: +34 1 336 73 73
Departamento de Arquitectura y Tecnología de Sistemas Informáticos
Facultad de Informática. Universidad Politécnica de Madrid. España
--------------------------------------------------------------------

P.S. I used Lyco to find the archive shc-3.2.tgz, but its readme
said shc-2.4a. Don't known why. Don't ask me.

0 new messages