This is going to depend somewhat on your setup, mainly what user the web server is 
running as and what group it might be in.  You could probably set your script to be 
710 if your web server is in the same group as you but not the same user as you. Or if 
you go to 711, then anyone can execute the script but not read it, except for the 
owner which may be what you want.  The same essentially applies to teh directory, if 
the web server (owner/group) can't read the directory then it can't execute the 
script, so setting the directory to 700 with the web server running under a different 
owner/group will mean the script can't be run in a cgi context.

So determine whether the web server is running as the same user as you, if so you can 
limit it to 700, if it is running as a different user in the same group, then 710 
should do the trick, if it is a different user and group then you are looking at 711.

There is a chance though I didn't think this was the case that the script also has to 
be readable, in which case you are looking at 750 or 755.

1st digit = user
2nd digit = group
3rd digit = all

1 = execute
2 = write
4 = read....

sum the permission values,

7 = (4+2+1) = read, write, execute
6 = read, write
5 = read, execute
4 = read
3 = write, execute
2 = write
1 = execute

http://danconia.org

------------------------------------------------
On Tue, 24 Dec 2002 18:09:52 +0200, "Octavian Rasnita" <[EMAIL PROTECTED]> wrote:

> Hello all,
> 
> Please tell me what file permissions should I use for a CGI script.
> 
> I don't want others users from that server to view the content of my scripts
> because they contain passwords for MySQL databases.
> If I chmod 755 the scripts, the other users will also be able to see the
> files.
> 
> Can I deny other users to see the content of the cgi-bin directory (chmod
> 700) and chmod 755 only the files?
> Or, ... do I have other options?
> 
> Thank you.
> 
> Teddy,
> Teddy's Center: http://teddy.fcc.ro/
> Email: [EMAIL PROTECTED]
> 
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to