Articles in this section

Website hosted in Plesk or some sections of it are inaccessible: 403 Forbidden error pcfg_openfile: unable to check .htaccess file

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • Plesk Obsidian running on a Linux-based operating system
  • Opening the domain of website hosted on Plesk in a browser returns a 403 Forbidden error
  • Website hosted in Plesk or some sections of it are inaccessible with an error similar to the following in /var/www/vhosts/example.com/logs/error_log:

    CONFIG_TEXT: AH01071: Got error 'PHP message: PHP Warning: require(/var/www/vhosts/example.com/httpdocs/wp-includes/load.php): failed to open stream: Permission denied in /var/www/vhosts/example.com/httpdocs/wp-settings.php on line 19
    PHP message: PHP Fatal error: require(): Failed opening required '/var/www/vhosts/example.com/httpdocs/wp-includes/load.php' (include_path='.:/opt/plesk/php/7.1/share/pear') in /var/www/vhosts/example.com/httpdocs/wp-settings.php on line 19'

    CONFIG_TEXT: [crit] [client 203.0.113.2] (13)Permission denied: /var/www/vhosts/example.com/httpdocs/css/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, referer: http://www.example.com/index.html

  • The File Manager for the domain in the Plesk GUI cannot be opened and returns an error that is similar to the following:

    PLESK_ERROR: Unable to find the directory /var/www/vhosts/example.com: filemng failed: move_to_cgroup(): pam_open_session() failed 6: Permission denied Unable to limit resources for process 6665 for user joedoe filemng: opendir failed: Permission denied System error 13: Permission denied

Cause

Incorrect permissions or ownership for website files and directories.

Resolution

  1. Log into Plesk
  2. Go to Subscriptions > example.com and determine the system user for the Subscription tied to the affected domain:
    22.PNG
  3. Connect to the server via SSH as the root user

  4. Run the following commands:

    Note: Replace "johndoe" with the system user name from step #2

    # find /var/www/vhosts/example.com/httpdocs/ -type f -exec chmod 644 {} \;
    # find /var/www/vhosts/example.com/httpdocs/ -type d -exec chmod 755 {} \;
    # find /var/www/vhosts/example.com/httpdocs/ -type f -exec chown johndoe:psacln {} \;
    # find /var/www/vhosts/example.com/httpdocs/ -type d -exec chown johndoe:psacln {} \;

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.