Encrypt source code or Provide execute only permission

To perform a black box testing and get users' feedback, we are planning to deploy a script in a common location and ask users to execute the script. However we do not want them to have a look at the script until the testing is done. I know this is against the open source concept, but it will be for a short period until the testing is complete.

I have server MyServer which has many users. I create a file with MyUserId under /tmp/TestScript.ksh

If I provide permissions 111, then no one is able to execute it due to lack of read permission. But I do not want to give read permission.

Only the owner must read and write the script. Is there anyway we can encrypt source code or revoke read permission for all users?

only root can execute the script without read access as root can read anything implicitly.

as root

chown root:root /tmp/TestScript.ksh

chmod 4111 /tmp/TestScript.ksh
chmod 2111 /tmp/TestScript.ksh

now log in as the other user

and execute the script.

read this thread

and this article
http://www.evolt.org/article/UNIX\_File\_Permissions\_and\_Setuid\_Part_2/18/263/index.html

for more info

don't do this. This is a huge security issue. Some UNIX systems will drop setuid/setgid on shell scripts anyways.

I don't have root permission anyway.

Why not just compile the script using shcomp? shcomp comes with ksh93.

How proficient are those users? If they're not too proficient you might be able to hide the source using uu{en,de}code, eg uuencode your script, put the coded text into a variable in another script where you decode it on start into a temporary file, which you then execute. Just make sure to delete it afterwards.

Thanks for all your inputs.