Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can a ksh script be compiled

Status
Not open for further replies.

otocac01

MIS
May 13, 2001
6
Hi,

Does anyone know of a way to compile a ksh script, the objective being to ensure that the script contents cannot be read by users who will run the script.Any help is appreciated.

Thanks and regards,

Oto
 
You can't compile a shell script, but how about setting the file permissions so that it cannot be read by anybody

e.g rwx --x --x

This would nake the script executable by anybody, but only readable by the owner.
 
If your goal is to let other users execute but not read, you must also set the set-uid bit - otherwise other users get an error saying they can't open the file. So:

chmod 4711 script
--or--
chmod u+s script

Sets perms as -rws--x--x. This should now work.
 
Hi Guys,

Thanks for the replies.I was actually oping there was another way eg an encrytion tool but I think I am asking too much.Thanks again.

Regards,

Oto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top