All plugins creating files with no read permissions
-
I recently migrated numerous wordpress sites from a shared hosting account to a Hosting VPS with CyberPanel and Litespeed Server.
The vast majority work perfectly fine, but one has a very strange bug where the files created by the installed plugins are created with no read permissions. For example when a new invoice is created by a woocommerce invocies plugin, the pdf is succesfullly created in the uploads folder, but can’t be accessed via the browser as it give a 404. More problematically, when new CSS files are generated, these can’t be loaded by the browser, so the design of the page is (partially) unstyled and so looks terrible.
These issues can be fixed by running chmod on the files and everything is fine until more files are generated. I’ve set up a chmod on cron to run every 15 minutes as a stopgap solution, but there are still going to be moments when a visitor might see an unstyled site or get a 403 when trying to download an invoice etc.
Has anyone experience this before? Any ideas how to fix? I’m presuming it’s some mystery setting in CyberPanel or LiteSpeed Server admin.
I’ve tried adding the following to the wp-config.php:
define(‘FS_CHMOD_FILE’, 0664);
define(‘FS_CHMOD_DIR’, 0755);
I’ve checked the umask value and it appears to be 022.
Anyone have any ideas how I can fix this?The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.