No kidding. If you can not read a file, then nether the shell can. Those files probably are compressed and there is one command in "clear", which uncompresses the content and passes it to the shell.
If you want to make scripts unreadable then your friend is sudo (assuming you have root access)
[ol]
[li]Create the script, for example myscript.ksh in /usr/local/bin[/li]
[li]chmod 700 myscript.ksh - the script is now only readable by root.[/li]
[li]Add the line to the sudoers file
Code:
ALL myhost=/usr/local/bin/myscript.ksh
[/li]
[/ol]
I use a similar method to protect scripts which have hardcoded passwords (ugh!) in them. For added security you might want to create /usr/local/secure_bin with 700 permissions to store these files.
It's far from perfect but it's simple to implement.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.