php - Image file permission - image resizer -
PHP mySQL
Hi, I have an interesting problem. I have a form in my CMS Allows to upload images to the server. The script transforms the images into a thumbnail (170px height) and a larger image (600px height). Thumbnail size is around 16000k and large images are approximately 160,000k in size. I do not set file permissions and just let it happen automatically when I go to the site I can see thumbnails but I can not see images of full size and I tracked this problem below on file permissions. There are RW-R-R permissions in thumbnails and RWs in larger pictures - - Permissions - that is, the public is not allowed to see large images. I save big images with the name of the original and I save the thumbnail with the thumbnail by adding the thumbnail to the end. Why do large images have different permissions, when they are uploaded and rewritten by the same script and when I do not set the file permissions? Does it have something to do? I get this problem when production uploads images to the server, not when working on my local machine. Thanks Andrew
How are you changing the size of the pictures? Are you using an external program?
This is just an estimate, but here
- an image uploaded by the administrator
- to upload the php script file upload.jpg rw- The image resizer program calls the php script to create image_thumbnail.jpg
- Image resizer writes image_thumbnail Jpg as rw-r-- Php script call image resizer program
- image resizer overwrites image.jpg, but without permissions Rw- (644)
- - --- (600)
Note that part to Ikshn is where it changes the image. Check Jpg to 600px, and then allow permissions for originally uploaded images. If they are 600, then your problem is.
However, a simple chmod
will solve your problem.
Comments
Post a Comment