Applicable to:
- Plesk for Linux
Symptoms
-
Files like
.htaccess
orwp-config.php
cannot be opened nor edited in Plesk File Manager via CodeEditor. They just keep loading: -
Going to Tools & Settings > Web Application Firewall (ModSecurity) > Web application firewall mode is set to On
-
Nginx is uninstalled, disabled, or its service is not running:
# plesk sbin nginxmng --status
Disabled# plesk sbin nginxmng --status
Error: Nginx component is not installed.
Browser console (F12) > Network tab > Shows that the request is blocked with an error 403. And the following error can be found in the Apache log file:
CONFIG_TEXT: [proxy:error] [pid 480:tid 140170217060096] (32)Broken pipe: [client 203.0.113.2:25479] AH01084: pass request body failed to 127.0.0.1:8880 (127.0.0.1)
[:error] [pid 480:tid 140170200274688] [client 195.214.233.10:25474] [client 203.0.113.2] ModSecurity: Access denied with code 403 (phase 2). Pattern match "(?:(?<!\\w)(?:\\.(?:ht(?:access|group|passwd)|www_{0,1}acl)|boot\\.ini|global\\.asa|httpd\\.conf)\\b|/etc/)" at ARGS:file. [file "/etc/httpd/conf/modsecurity.d/rules/custom/001_i360_1_generic.conf"] [line "74"] [id "77211190"] [msg "IM360 WAF: Remote File Access Attempt||MVN:ARGS:file||MV:.htaccess||T:APACHE||"] [severity "CRITICAL"] [tag "service_gen"] [hostname "plesk.example.com"] [uri "/smb/file-manager/code-editor/domainId/18/"] [unique_id "YKe-UdncFkEOiFA6fNLUeQAAARM"], referer: https://plesk.example.com/smb/file-manager/list/domainId/18?modals%5Beditor%5D=
Cause
Product issue:
-
#PPPM-12921 "Users can now open the wp-config.php file and other WordPress subscription files in Code Editor. Previously it was occasionally impossible under certain circumstances."
Fixed in:- Plesk Obsidian 13 October 2021 (Linux)
Resolution
Workaround
If update is not possible for some reason you may try the following
As a workaround, apply one of the following steps:
-
Disable ModSecurity at Tools & Settings > Web Application Firewall (ModSecurity) > Web application firewall mode.
Comments
3 comments
Hi
I cannot edit the wp-config.php file at all. All other files are OK. I am logged in as admin.
I can confirm:
Web Application Firewall (ModSecurity) is off
Nginx is installed and running.
I am accessing through a domain and 8443.
Any suggestions on why this is happening solely for the wp config file and a way to fix it. The file has the same permission levels as all the other files in the folder that I can edit with no problem at all.
Thank you for any help you can provide.
Best regards
Sheila
It didn't fix my problem. The issue seems to affect the wp-config.php files only. Not the others.
It wasn't fixed in the update for me either unfortunately. I'm on version Version 18.0.49 Update #2. The workarounds did not help either. The only way I'm able to edit the wp-config file is through FTP or terminal. A fix or guidance to an effective workaround would be appreciated!
Please sign in to leave a comment.