I recently migrated numerous WordPress sites from a shared hosting to a VPS with AlmaLinux with CyberPanel and Litespeed Server.
Most are working fine, but one has a significant issue where any files generated by plugins get created with 660/-rw-r----- permissions, so return a 403 when accessed by the browser. The plugins are able to create the files, so have access to the directory (wp-content/uploads/), but the generated files can't be accessed.
For example when CSS files are generated, they have no read permissions so the CSS doesn't load leaving the website in chaos, or when a new invoice is generated for a woocommerce sale, it can't be viewed.
I currently have a chmod running on cron to fix the permissions of newly generated files as a temporary stopgap, but I need a proper fix asap.
It's the only site running on an older version of php (7.4 rather than 8.2) as some of the plugins weren't compatible with the latest version, so I'm presuming it's related to the configuration of php7.4 somehow, but I can't find exactly why.
Has anyone experienced this before? Any suggestions on how to fix would be much appreciated!
Most are working fine, but one has a significant issue where any files generated by plugins get created with 660/-rw-r----- permissions, so return a 403 when accessed by the browser. The plugins are able to create the files, so have access to the directory (wp-content/uploads/), but the generated files can't be accessed.
For example when CSS files are generated, they have no read permissions so the CSS doesn't load leaving the website in chaos, or when a new invoice is generated for a woocommerce sale, it can't be viewed.
I currently have a chmod running on cron to fix the permissions of newly generated files as a temporary stopgap, but I need a proper fix asap.
It's the only site running on an older version of php (7.4 rather than 8.2) as some of the plugins weren't compatible with the latest version, so I'm presuming it's related to the configuration of php7.4 somehow, but I can't find exactly why.
Has anyone experienced this before? Any suggestions on how to fix would be much appreciated!