Web Hosting Talk







View Full Version : CGI scripts access mode


Romanticus
07-18-2003, 04:37 AM
I know that *.pl (*.cgi) script must have 755 access mode.

But I have 1 problem:

I have a script and I don't want that other users on the site can read it, but can execute.

I want to make source unreadable (there's a passwords in them that should be kept in secret).

Any ideas?

ancilenet
07-18-2003, 08:20 AM
chmod 775 ..might work :) or 711.

Romanticus
07-21-2003, 06:39 AM
Huh. If I set 711, everybody (others) can READ the script, but not run it! I need vice versa: run it, but not read!

Romanticus
07-26-2003, 02:27 PM
so is it possible or not??

sitekeeper
07-26-2003, 02:44 PM
Try 700

sasha
07-26-2003, 02:57 PM
Originally posted by Romanticus
so is it possible or not??
Not the way you would like it.
If suexec is available then the webserver would run the script as your user account so 700 would do the job. Or you could compile the perl script with perlcc and make passwords unreadable to some extent.