CGI Script Permissions Question

Lor

Well-Known Member
Apr 29, 2005
63
0
156
My cronjob scripts have permission 0700. But I can start it from browser. How to setup permissions to prevent start scripts with 0700 from web-browser?

I have permissions:
/cgi-bin/ - 0755
/cgi-bin/scripts.cgi - 0755
/cgi-bin/cron-scripts.cgi - 0700

I fill stupid ... :( Please help!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
Hello,

You could setup a .htaccess file to the directory the files are stored in with an entry like this if you wanted to prevent browser access to CGI and Perl files:

Code:
<FilesMatch "\.(cgi|pl)$">
Require all denied
## For apache 2.2 and older, replace "Require all denied" with these two lines :
# Order deny,allow
# Deny from all
</FilesMatch>
Thank you.