Permissions for files and folders
Foreword
For a website to run correctly, the files and folders must belong to the correct Linux user and the correct Linux group. If the permissions are set incorrectly, the web server or PHP-FPM cannot access the files and folders and the website may not be displayed correctly.
Permissions for the root directory
The root directory, also known as the document root
, requires the following authorizations:
directory | user | group |
---|---|---|
/httpdocs/ | system user | psaserv |
Example path:
/var/www/vhosts/demo-site.com/httpdocs
Authorizations for contents of the root directory
Contents within the root directory require the following authorizations:
directory | user | group |
---|---|---|
/httpdocs/* | system user | psacln |
Example path:
/var/www/vhosts/demo-site.com/httpdocs/*
Customize the permissions for a web page
To check the current authorizations, connect to the corresponding creoline server via SSH. Then navigate to the desired directory and execute the following commands:
# Navigate to the base directory
cd /var/www/vhosts/demo-site.de
# Adjust the permissions for the root directory
chown systemuser:psaserv httpdocs
# Adjust the permissions for the content
chown -R systemuser:psacln httpdocs/*
Customize permissions for all websites
To check the permissions for all websites, the Plesk Control Panel provides a Linux command for repair:
plesk repair fs
Possible errors with incorrect authorizations
- Unintentional HTTP error 403
- Unintentional HTTP error 404
- PHP errors due to failed file operations
- PHP errors due to failed folder operations
If problems occur in your web application when creating files and folders, the cause is often incorrect authorization.