After installing LiteSpeed in our server, new uploads in WordPress websites (wp-content/uploads directory) are showing “nobody” permissions.
If switched back to Apache, uploads work fine and are uploaded under the correct user.
Error log when uploading files:
2020-12-21 05:25:24.815 ERROR [ModSecurity] unknown server variable while parsing: MULTIPART_STRICT_ERROR
2020-12-21 05:28:06.123 ERROR [ModSecurity] unknown server variable while parsing: MULTIPART_STRICT_ERROR
2020-12-21 05:34:12.019 ERROR [ModSecurity] unknown server variable while parsing: MULTIPART_STRICT_ERROR
2020-12-21 05:35:02.188 ERROR [ModSecurity] unknown server variable while parsing: MULTIPART_STRICT_ERROR
2020-12-21 05:40:07.987 ERROR [ModSecurity] unknown server variable while parsing: MULTIPART_STRICT_ERROR
2020-12-21 05:42:46.542 ERROR [ModSecurity] unknown server variable while parsing: MULTIPART_STRICT_ERROR
2020-12-21 05:45:08.357 ERROR [ModSecurity] unknown server variable while parsing: MULTIPART_STRICT_ERROR
2020-12-21 05:47:41.341 ERROR [ModSecurity] unknown server variable while parsing: MULTIPART_STRICT_ERROR
2020-12-21 05:52:12.195 ERROR [ModSecurity] unknown server variable while parsing: MULTIPART_STRICT_ERROR
2020-12-21 06:00:00.886 ERROR [ModSecurity] unknown server variable while parsing: MULTIPART_STRICT_ERROR
To fix this head over to WHM » Plugins » LiteSpeed Web Server Plugin » LiteSpeed Configuration » PHP suEXEC Quick Configuration
NOTE: On older versions of cPanel & LiteSpeed this setting is located under: Server » General » PHP suEXEC
Change the Enable PHP suEXEC option to YES and update the settings.
The Enable PHP suEXEC option in the LiteSpeed Web Server plugin specifies whether to run PHP scripts in suEXEC mode when User and Group are specified for a virtual host.
- When set to yes, PHP scripts will be executed under the user (and group unless Force GID is set) specified.
- When set to User Home Directory Only, scripts outside a user’s home directory will run as the global user/group that the webserver runs as.