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.

Public html folder permission changes automatically

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

Tags:
  1. Nilesh Toshniwal

    Nilesh Toshniwal Registered

    Joined:
    Nov 30, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    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,009
    Likes Received:
    87
    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:
    582
    Likes Received:
    177
    Trophy Points:
    43
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,516
    Likes Received:
    1,616
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page