PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'm creating an oop image gallery. I've created two classes. One that opens directories and displays images and a second that creates thumbnails and saves them to a directory. The problem is the directory has to be chmoded to 0777 in order for the script to work. The image is being saved to the directory using imagejpeg (or png or gif). The only way I could get it to write to the directory was chmoding it to 0777. Does anyone know of a way around this? Or should I not be concerned with a 0777 directory?
Ambush Commander wrote:Well, from what I gather, all you need are group permissions / owner permissions to read/write/execute, so 0770 would be fine?
Bzzt, not exactly.
Its "User / Group / Other" or "User / Group / World", so all he needs is 0007.
The webserver user (apache) is different than the owner of the directory, so its "other/world". If the webserver is the same (very bad idea), then its just 0700, because then its user-user.