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!

Public html folder permission changes automatically

Discussion in 'Security' started by Nilesh Toshniwal, Nov 30, 2017.

Tags:
  1. Nilesh Toshniwal

    Joined:
    Nov 30, 2017
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    india
    cPanel Access Level:
    Root Administrator
    Hi all cpanel experts here

    I am not a server administrator but do have root access to my servers, my issue is that on few of my websites (which are built in wordpress mostly), htaccess file content either gets changed automatically or htaccess file removed, I checked all my code and there is no virus or malware infection, and we dont see any such issue, to secure more, I tried changing public_html folder permission to 555 and also for htaccess to 444 but if I do so, not sure because of which process but my public html folder permission automatically gets reset to 750 and due to that htaccess is removed also

    Can someone help me figuring out the issue.
     
  2. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    1,011
    Likes Received:
    89
    Trophy Points:
    78
    cPanel Access Level:
    DataCenter Provider
    The public_html directory should be 750 and is not intended to be changed. Setting 555 would make your public_html directories readable across account, which is a nightmare security wise especially with multiple WP sites. Generally this is a bad idea for that reason, which is why the file protect feature in WHM/cPanel will revert those permissions on public_html directories.

    Regarding .htaccess what is the exact path of the .htaccess file that is being affected? Do you think cPanel is affecting it, or is it just affected in your scenario due to the change in permissions on public_html itself? I don't recall a reason that setting 444 on a .htaccess file would be an issue.
     
  3. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    983
    Likes Received:
    387
    Trophy Points:
    113
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

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