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!

Restrict access to all files outside public_html

Discussion in 'Security' started by GKey, Jan 10, 2018.

  1. GKey

    GKey Member

    Mar 21, 2007
    Likes Received:
    Trophy Points:
    We have several accounts that need to upgrade their websites and as a result access needs to be given to web developers.

    As a security precaution, we would like to restrict access for the said web developers to public_html folder only. (Primary concern is that they shall not have access to Mail folders)

    Although we can restrict access through ftp to public_html, any PHP script uploaded to public_html has access to all files within the account, including mail. So Mail can be read and even deleted through PHP script execution.

    Could someone advice if such a restriction is possible and how can it be achieved ?
    Thank you in advance.
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    Can you provide more information or steps we can take to reproduce a PHP script under the public_html directory reading contents from the account's mail directory? Does the issue persist after enabling the PHP open_basedir tweak referenced on the URL below?

    PHP Security Concepts - cPanel Knowledge Base - cPanel Documentation

    Thank you.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

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