File permissions
-
Hi,
Are there any conditions where EWWW could change image file permissions from 644 to 600?
I’m investigating a client site that appears to have had a load of images ‘disappear’ from Media Manager and the pages/posts but they are all there but the permissions are set to 600 therefore get denied.
-
YES there are conditions….but I can’t work them out … yet.
EWWW active and upload via Media Library results in images with a 600 file permission. Deactivate EWWW and upload the same image the same way and you get 666.
I can’t see anything different I have done with EWWW settings so I guess it is a plugin conflict. Might need some help on this one Shane!
Hmm, that’s odd, seems like WP (or another plugin) sets the permissions to 666, but when EWWW optimizes them (creating a new file), the system is creating them with 600. Do you have enough control on the server to change the umask? See this page for more info: http://superuser.com/questions/808345/change-default-permissions-for-new-files-and-folders
Shane,
I don’t have that capability but my very patient hosting engineers will … but I’m not sure I want to bend their arms on this. I did give them some grief during my investigations and swore blind it wasn’t a plugin!
More than happy to let you loose as Admin in the site (it is a live client site however!). I can also let you have access to a sister site (same client, same theme, same plugins mostly) that doesn’t have the issue … and both on the same server.
Let me know if you want to pursue, and how to contact you. 🙂
Ok, I think I found out why it does that. WordPress core saves files with 666 permissions or whatever the parent directory has. EWWW doesn’t set permissions at all, and because it is creating “new” files as it optimizes (the results are stored to a .tmp, and then copied over the original if successful), the files get the umask setting, instead of the other. It looks to be an easy fix, I’ll put it into the next version.
Shane,
Once again you prove to be, by far, the most responsive and open plugin developer I’ve come across! My hat off to you sir!
You can grab the fix here: https://downloads.wp.xz.cn/plugin/ewww-image-optimizer.zip
Let me know if it works properly.
Shane,
Looks like you cracked it. As I write I am watching a manual optimisation and checking file permissions via an FTP connection and the resulting images are all 644 permissions.
While processing an image I see the file name is changed to xxxx.jpg.processing and has a permission of 600 and when it’s completed the permission is again 644, as it should be.
Superstar!
Awesome, thanks for the followup!
The topic ‘File permissions’ is closed to new replies.