in reply to Execute But Not Read

Hi,

You can always change mode by taking away "read". with these commands:
chmod =r yourcode.pl OR chmod 444 yourcode.pl OR chmod a-wx,a+r yourcode.pl
If that's not what you want you probably want to put the password into your perl code and read this file into your perl code.

But why you want to hide your code? Usually the rule is "hide the data but open the code". If you hide the code, your program isn't safe.

Regards,
Edward WIJAYA

Replies are listed 'Best First'.
Re^2: Execute But Not Read
by Joost (Canon) on Jan 21, 2005 at 10:30 UTC
      That works fine on OpenBSD. Even a perl script, like this: ---x--x--x 1 root wheel 33 Jan 21 10:13 hello.pl can be executed by non-root user. But it has to be called directly, like: ./hello.pl Trying to run it with "perl hello.pl" will give permission denied... Advanced users will still be able to access the source with ktrace or ptrace though. But if you own the server, you could always hack your kernel to not allow tracing root-owned programs. And the users won't be able to copy your program to run elsewhere since the perms don't allow it...