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!

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:
    58
    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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,145
    Likes Received:
    1,932
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Lor

    Lor Well-Known Member

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

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice