• 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

Issue Unable to edit some files with File Manager in Plesk: file loads indefinitely

PrimeSites

New Pleskian
Server operating system version
Ubuntu 20.04.6 LTS
Plesk version and microupdate number
Plesk Obsidian 18.0.51, last updated on Mar 26
Hi All,
I'm unable to edit certain files (e.g. wp-config[dot]php) via the File Manager in Plesk, regardless of file permissions.
The issue is covered in the below post, and indicated as resolved by PPPM-12921 (dating back to 2021), but it's persistent for me (i.e. file just loads endlessly).
Issue: https://support.plesk.com/hc/en-us/articles/12376964923031

Apart from the workarounds mentioned in the post, are there perhaps any permanent solution to this issue? Is anyone else facing this issue? Is there perhaps something else, apart from the prescribed upgrade, that could be missing in fixing the issue?

Thanks for your assistance.

I'm on: Ubuntu 20.04.6 LTS. Product: Plesk Obsidian 18.0.51, last updated on Mar 26
 
Hi @scsa20
Thanks for the input.
Tailing logs pre-and-post attempting to edit a wp-config.php file shows no additional entries.
I've checked:
- /var/log/sw-cp-server/error_log
-/var/log/sw-cp-server/sw-engine.lo
-/var/log/plesk/panel.log
-/var/log/plesk/httpsd_access_log

If I copy the file to e.g. wp-config1.php in the same folder, I can edit it. But the wp-config.php file specifically, on any WP installation, results in the issue.
 
There should be logs to explain what's happening. If you're not able to find any details, I would suggest you open a ticket with Plesk support if your license is through them directly. If you didn't bought your license directly from Plesk then you'll want to first try to get support from the reseller of where you got the license from. You can still get support directly from Plesk though if you wish, just refer to the following article:

 
If you were still running on 18.0.38 and older then sure, but that's been long since patched and I couldn't repeat the issue, thus why I suggested reaching out to Plesk support and see what they say, presuming you've made sure everything else is fine, services running, restarted the server, etc.
 
I have the same problem. Cannot open the wp-config.php file no matter the permissions. changed permission to 755 in SSH terminal also no use. The code editor just keep spinning when you try to open the file or change the permission setting. Mod security is switched off and nginx is set to proxy. All no use.
 
@gaechuan This is only known to old Plesk versions. Which version do you use? Can you update Plesk to the latest version? Another workaround can be to access the GUI with hostname and port 8443 (<hostname:8443>).
 
@gaechuan This is only known to old Plesk versions. Which version do you use? Can you update Plesk to the latest version? Another workaround can be to access the GUI with hostname and port 8443 (<hostname:8443>).
OS: Ubuntu 22.04.2 LTS
Product: Plesk Obsidian 18.0.53 Update #2, last updated on June 21, 2023 06:26 AM

yes, using port 8443.
 
Could you please verify that not only the file permissions of wp-config.php are at least 0755 (for testing purposes), but also the permission of the document root are at least 0750? Also please make sure that the file is owned by the subscription user and group-owned by psacln.

You mentioned that ModSecurity is disabled. Do you see any error_log entries when file manager tries to access the wp-config.php file? What is logged?
 
Could you please verify that not only the file permissions of wp-config.php are at least 0755 (for testing purposes), but also the permission of the document root are at least 0750? Also please make sure that the file is owned by the subscription user and group-owned by psacln.

You mentioned that ModSecurity is disabled. Do you see any error_log entries when file manager tries to access the wp-config.php file? What is logged?
I have changed my wp-config.php to 644 and the httpsdoc directory is always rwx r-x --- (750). Even if changed to 755 for wp-config, it is still the same.

Yes, modsecurity is turned off, disabled. I don't think I see any error log when file manager tries to access the file. What is logged in the error_log file last entry:

[Wed Jun 28 22:37:13.019267 2023] [authz_core:error] [pid 1386:tid 140350572049984] [client 162.158.48.101:0] AH01630: client denied by server configuration: /var/www/vhosts/(mydomain.com)/httpdocs/xmlrpc.php [i have changed my domain name].
 
The error message indicates that you may have some security settings in place. In the WP Toolkit Security settings, have you checked the "Restrict access to files and directories" checkbox? That would prohibit modification of the wp-config.php file through a script. Maybe you can try to uncheck this?

1687972442217.png
 
The error message indicates that you may have some security settings in place. In the WP Toolkit Security settings, have you checked the "Restrict access to files and directories" checkbox? That would prohibit modification of the wp-config.php file through a script. Maybe you can try to uncheck this?

View attachment 23672
unable to uncheck. it's a premium feature.
 
I have a rest api error: curl 7 error failed to connect to port 443 after 0 ms: connection refused. Has this got to do anything with it?
 
I do not know what curl request is meant, but probably it has nothing to do with accessing wp-config.php for editing.

Do you have the line
location ~* wp-config.php { deny all; }
in /var/www/vhosts/system/<your domainname>/conf/nginx.conf?
 
I do not know what curl request is meant, but probably it has nothing to do with accessing wp-config.php for editing.

Do you have the line
location ~* wp-config.php { deny all; }
in /var/www/vhosts/system/<your domainname>/conf/nginx.conf?
no, don't have.
 
With no such limit in the Nginx configuration and all other things checked like ownership of the file, permission set etc., it is impossible that the file cannot be accessed. This needs to be re-checked carefully that *really* everything is correct. There has got to be a permission block somewhere. If it is not in the webserver configuration, it can only be on the file system level.
 
Back
Top