Question
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.
Please advice
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.
×
Hi Vladimir,
Did you find a solution to this?
We’re having the same issue and even when we fix permissions, it will work okay for a few weeks but a new month of wordpress and again, the permissions won’t allow wordpress to create a new folder for media, causing an error on upload