I am trying to scale images in PHP using system() calls to perform the following:
djpeg - To take the image and decompress it to pnm format in a temporary file
pnmscale - To take the temporary pnm file and scale it, writing the new data to the same file
cjpeg - To recompress the temporary pnm file to JPEG
I am not having any problems actually RUNNING the commands, the problem comes in the Linux file permissions. It seems that when djpeg creates the temporary pnm file, it creates it with owner read and write permissions only, and for some reason that causes pnmscale to not be able to alter it. I can't change the permissions through FTP (access denied because of permissions) and I don't know what the shell command would be to change it (I know it's CHMOD still, but I am not too great with Linux and have no clue what the whole command to enable read write and execute for all users or the appropriate users would be). 😕 Please help! By the way, this is on a shared server. Thanks in advance..