Problem with WordPress file permissions
Hello gentlemen, ever since we moved our site to digital ocean we have issues with our site media library. We are using a premade image, running ubuntu on cyberportal with openlitespeed on it.
Our root www folder is /home/sitename/public_html/ and everything inside that is set to be under www-data ownership (we tried different options as well). While the whole dir is owned by www-data our media library can’t be updated and wordpress triggers the error (can’t move file to the folder, etc).
Even worse, site library can access all of the existing media (the ones that we moved manually) and display them properly, but all of the newly updated/crated posts and media won’t show properly. It looks like while posting something the media/file is saved but then it gets removed from a featured image (for example) and its thumbnail is broken. We can access the image through a direct link.
I tried everything I could find, from scripts to fix the permissions, through cyberpanel fix permissions and ssh but everything failed. Does anyone have any clue what this could be? Again, only images uploaded now are broken, not the ones that are there already.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×