General discussion

Locked

Script Source

By myr3070 ·
How can we hide the script source from end-users or from other users in the same group while they need to run it as well.

Is there anyway to compile it without using any 3rd party tool.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Script Source

by nikki96 In reply to Script Source

Make the file permissions rwx--x--x (711). Allows the owner to read, write, execute and group and others execute only.
See "chmod" (man chmod) for how to change file permissions.

Collapse -

Script Source

by myr3070 In reply to Script Source

No one in the group is able to execute the program without "read" permission. It doesnt work unless you add both "r" and "x". I did the test on HP-UX.

Collapse -

Script Source

by alveden In reply to Script Source

The question is ambiguous.
What kind of script are you using, csh, sh, bash, perl, ruby .... etc?
1. Most distribution of unices comes with a C compiler, you can rewrite your script to C coding that perform command calls to your OS, similar to your script.

2. If your unices comes with a perl distribution, and if your script is in perl. Perl is can be complile using a c compiler. I would suggest using gcc ... although it can be considered a 3rd party tool.

3. Lastly, and the easiest way is probably get a setuid/setgid wrapper. Something like SUDO, where you can protect the source by changing the file permission to 700, and yet, using sudo, allow the user to excute as the owner.

Collapse -

Script Source

by myr3070 In reply to Script Source
Collapse -

Script Source

by myr3070 In reply to Script Source

This question was closed by the author

Back to Linux Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums