Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

CGI Script Permissions Question

Discussion in 'General Discussion' started by Lor, Apr 21, 2017.

  1. Lor

    Lor Well-Known Member

    Joined:
    Apr 29, 2005
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    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!
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
  3. Lor

    Lor Well-Known Member

    Joined:
    Apr 29, 2005
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    156
    Thank you. I found SUEXEC has been turned ON.
     
Loading...

Share This Page