• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved 403 Forbidden after installation

terrorjunk

New Pleskian
Hello,

I just installed plesk for the first time, never used it before, everything went well but when I uploaded my website (to httpdocs) and tried to access it, I get a 403 forbidden error.

I checked all permissions and everything seems okay to me, httpdocs had rwx r-- r--, I changed it to rwx r-x r-x but that didn't help.

There are also no error logs in the log.

Any suggestions?
Thanks in advance!
 
The correct owner setting for httpdocs is [username] : psaserv. Indeed changing this to psacln might cause issues, so better leave it to psaserv. You may want to make sure that all files and directories under /httpdocs also have this setting:
# chown -R [username] : psaserv httpdocs
(omit the space in the owner-group setting; I only put it in here, because this platform replaces a : p with :p when the space is not there)

The correct file permissions for the directory are rwxr-x--- (750).
# chmod 750 httpdocs

Please check your error_log entries for further details on the 403 forbidden error. It can have many reasons, for instance:

"pcfg_openfile: unable to check htaccess file, ensure it is readable." discussed in https://kb.plesk.com/en/112884

"(13)Permission denied: /var/www/vhosts/example.com/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, referer: http://example.com/" discussed in https://kb.plesk.com/en/120112

See the kb.plesk.com and search for "403 forbidden" for more.

This error might not be related to Plesk at all. Check whether you have an index.html or index.php file in your /httpdocs directory. Also check your .htaccess settings. These may block access. For testing purposes I recommend to disable .htaccess (rename it) and to then try to download a static file from that directory. If that works, the issue is not related to Plesk, but to your website settings.
 
Hey, thanks for your reply! Really appreciated!

You may want to make sure that all files and directories under /httpdocs also have this setting
They all were psacln, when I run this command: # chown -R [username]:psaserv httpdocs , I get this message for all files: Operation not permitted. Probably because I'm not the root user...

Edit, now I get this error when using sudo:
sudo chown -R hardtubetv:psaserv httpdocs
chown: cannot access ‘httpdocs’: No such file or directory

Please check your error_log entries for further details on the 403 forbidden error.
The problem is that it doesn't show any error logs related to the 403 error. The only log in there is this: server certificate does NOT include an ID which matches the server name

Check whether you have an index.html or index.php file in your /httpdocs directory. Also check your .htaccess settings. These may block access. For testing purposes I recommend to disable .htaccess (rename it) and to then try to download a static file from that directory.
I have and index.php file, already tried to rename & remove .htaccess, also removed all contect from .htaccess but that all doesn't seem to work.
 
Last edited:
The correct owner setting for httpdocs is [username] : psaserv. Indeed changing this to psacln might cause issues, so better leave it to psaserv. You may want to make sure that all files and directories under /httpdocs also have this setting:
# chown -R [username] : psaserv httpdocs
(omit the space in the owner-group setting; I only put it in here, because this platform replaces a : p with :p when the space is not there)

As far as I know the files inside the httpdocs directory should have owner psacln
ownership.

See http://docs.plesk.com/en-US/12.5/ad...structure/virtual-host-structure-linux.68806/

Note: The /httpdocs directory and the /cgi-bin directory inside it should have the owner psaserv ownership.
All other files and directories inside the /httpdocs directory should have the owner psacln ownership.


Maybe running repair can fix thread starter issue?

https://kb.plesk.com/en/6572

For Plesk 11.5, 12 and 12.5:
  1. Make sure that the latest microupdate is installed.

  2. Run the following command with the superuser privileges

    # /usr/local/psa/bin/repair --restore-vhosts-permissions
 
Last edited:
As far as I know the files inside the httpdocs directory should have owner psacln

See http://docs.plesk.com/en-US/12.5/ad...structure/virtual-host-structure-linux.68806/

Note: The /httpdocs directory and the /cgi-bin directory inside it should have the owner psaserv ownership.
All other files and directories inside the /httpdocs directory should have the owner psacln ownership.

Yes, yet we've seen several customer web installation where a 403 forbidden error could be resolved by giving group psaserv the permissions. It may be for different individual file permissions on some files. It might not apply to this case. Still the httpdocs directory should be owned by psaserv, not psacln.
 
Also repairing doesn't seem to work...
Mannaged to change the group from psacln to psasrv but I still get the 403 error.
 
Last edited:
has this been resolved, or not? we have now on all our websites hosted under plesk onyx 503 and 402 errors. But no idea what happened...
 
Back
Top