If your wordpress installation directory is wordpress, the default wizard configuration will show insufficient permissions:
Sorry, but I can't write the wp-config.php file.
You can create the wp-config.php manually and paste the following text into it.
Or
Sorry, but the wizard does not have sufficient permissions to write wp-config.php files in your file system.
At this time, first consider the users and groups to which the wordpress folder belongs. Update the ownership of the wordpress directory and its subdirectories according to the User and Group configuration in httpd. conf:
Chown-R apache: apache wordpress/
If this method does not solve the problem, try the following command:
Ls-Z
Drwxr-xr-x. apache unconfined_u: object_r: httpd_sys_content_t: s0 wordpress
Chcon-R-t httpd_sys_rw_content_t # Add read/write permissions to httpd
Ls-Z
Drwxr-xr-x. apache unconfined_u: object_r: httpd_sys_rw_content_t: s0 wordpress
Note:
This problem is usually caused by manually creating the wordpress directory and then copying all the files in the original version. You can also directly copy the entire wordpress directory.