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.

Error: pcfg_openfile

Discussion in 'General Discussion' started by ronaldst, Mar 23, 2018.

  1. ronaldst

    ronaldst Active Member

    Joined:
    Feb 22, 2016
    Messages:
    43
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Norway
    cPanel Access Level:
    Root Administrator
    Error log for a few accounts running Wordpress sites are reporting errors regarding pcfg_openfile, file permissions.

    [Fri Mar 23 21:31:33.979762 2018] [core:crit] [pid 28095] (13)Permission denied: [client 123.123.123.255:55807] AH00529: /home1/user/public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home1/user/public_html/' is executable

    # stat /home1/user/public_html
    File: ‘public_html/’
    Size: 4096 Blocks: 8 IO Block: 4096 directory
    Device: 811h/2065d Inode: 6815757 Links: 12
    Access: (0750/drwxr-x---) Uid: ( 1004/ user) Gid: ( 1006/ user)
    Context: system_u:eek:bject_r:unlabeled_t:s0

    # stat /home1/user/public_html/.htaccess
    File: ‘public_html/.htaccess’
    Size: 4122 Blocks: 16 IO Block: 4096 regular file
    Device: 811h/2065d Inode: 6816134 Links: 1
    Access: (0644/-rw-r--r--) Uid: ( 1004/ user) Gid: ( 1006/ user)

    Enable File Protect is enabled in Tweak Settings -> Security.
    I ran /usr/local/cpanel/scripts/enablefileprotect, no errors reported.

    Any idea what might be causing this and a solution for it?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,734
    Likes Received:
    1,706
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Can you verify which PHP handler is enabled for this account? Also, is Mod_Ruid2 installed? Note that if you are using CGI as your PHP handler, install the suexec module to solve this error:

    Code:
    yum install ea-apache24-mod_suexec
    Thank you.
     
  3. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    1
    Trophy Points:
    168
    Make sure the 'group' for public_html is set to 'nobody' and the error should go away.
     
    Jcats likes this.
  4. ronaldst

    ronaldst Active Member

    Joined:
    Feb 22, 2016
    Messages:
    43
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    Norway
    cPanel Access Level:
    Root Administrator
    Sorry about my late reply to this topic.

    I am using mod_ruid2, php-fpm, php 7.2 runs with dso as handler.

    Do I need to set the public_html to user:nobody? Is 750 the right ownership settings for public_html?

    I see several topics where security with dso is mentioned as a concern. Can someone elaborate the flaws with php/dso/php-fpm please? I thought for a long time CGI were the weaker (security wise) option.
     
Loading...

Share This Page