mirror of
https://github.com/cloudpanel-io/cloudpanel-ce.git
synced 2026-04-05 20:31:58 +02:00
Wrong WordPress permissions are set during installation. #356
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @peaklabs-dev on 8/18/2023
CloudPanel version(s) affected
All
Description
When Wordpress is installed, the wrong permissions are set:

The permissions are always these:
The correct permissions for Wordpress should be
All directories should be 755 or 750
All files should be 644 or 640
Exception: wp-config.php and nginx.conf should be 440 or 400
How to reproduce
Possible Solution
Set the permissions during the Wordpress installation via a configuration file to:
All directories should be 750
All files should be 640
Exception: wp-config.php and nginx.conf should be 400
Or/ And add a button in the UI to reset permissions for sites already installed.
The script behind the button or that is used during installation could look something like this:
Additional Context
No response