I'm using the WP Smushit Pro
plugin created by WPMU DEV. Their support won't go this far so I'm reaching out. I'm pretty sure it's my server that has the issue anyway.
When an Image is Smushed, the PHP function rename()
runs and overwrites the original image.
Problem is:
Permissions are changed leaving the image inaccessible to online users
Previous permissions: rw-r--r--
(0644)
After modifed Perms : rw-------
(0600)
UPDATE
The optimized (smushed) image is created as a .tmp file (rename()
) in the same directory before being copy()
'd to overwrite the existing file.
Image Optimization Workflow
- Send original image (imagename) to get smushed
- Image returns, store it as imagename.tmp file
- copy imagename.tmp file to imagename - the original file
Have you encountered this type of permissions modification before?
If so, what can be done to gracefully solve the problem?