• Resolved siwhyatt

    (@siwhyatt)


    I’m having this issue with a few but not all wordpress websites using the Litespeed caching plugin on Hostinger VPS with AlmaLinux 8 and CyberPanel with Litespeed Server.

    When files are generated by the plugin – say CSS, JS or webp images, they are created with no read permissions( 0640), so can’t be read by the browser. The site loads without CSS or none of the images can be loaded.

    Running a chmod on the files fixes the issue temporarily, until new files are generated at which point the problem returns again.

    Has anyone experienced this before? I’ve checked umask for the websites and shows as 022. I’ve tried disabling security plugins, but no effect (they are also running the exact same plugins as other sites which don’t experience the issue).

    For the time being I’ve had to disable the plugin in order to keep the sites functional.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support litetim

    (@litetim)

    @siwhyatt please check the parent folder permission(maybe go until wp-content), from what I recall it affects the children permission

    Plugin Support litetim

    (@litetim)

    Plugin Support qtwrk

    (@qtwrk)

    you may need to check server setting, litespeed webadmin console -> server configuration -> security -> cgi setting -> umask , this value may affect how PHP creates file and its permission

    you can also use simple php funciton as file_put_contents to run as standalone script and test the result.

    Thread Starter siwhyatt

    (@siwhyatt)

    Thanks for the replies. All parent folder and all other file permissions are correct. It’s only newly generated files created by the litespeed cache plugin that lack the read permissions. Other plugins create files with the correct normal permissions. The umask setting of the wordpress directories is 022, the recommended setting and the same as all the other wordpress sites that don’t have the issue.

    Plugin Support qtwrk

    (@qtwrk)

    have you tried with simple file_put_content function ? how did it go ?

    Thread Starter siwhyatt

    (@siwhyatt)

    Thanks for your reply. So I did a test by creating a plugin that just created a test file within a folder inside the uploads folder. This was also created without read permissions. So it does appear that the problem is not limited to the litespeed plugin but related to the wordpress installation / server in general.

    I do still need a fix however, so any suggestions welcome!

    Plugin Support qtwrk

    (@qtwrk)

    if you create a simple php , without loading wp , how did it go ?

    this at least determine if it’s server side issue , or wordpress side issue

    maybe something in wp-config.php such as FS_CHMOD_DIR or FS_CHMOD_FILE ?

    Thread Starter siwhyatt

    (@siwhyatt)

    Thanks again for your replies. I had already tried those to no effect, though thankfully I have now found the solution.

    It was the Linux ACL (Access control lists) settings which were too restrictive.

    I’ve recursively run a setfacl on the uploads directory and subdirectories and the issue appears to be sorted.

    Plugin Support qtwrk

    (@qtwrk)

    glad to hear ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.