Page 1 of 1
Avoiding Chmod 0777?
Posted: Sat Mar 26, 2005 11:21 am
by neophyte
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?
Posted: Sat Mar 26, 2005 11:37 am
by feyd
ftp?
Posted: Sat Mar 26, 2005 11:41 am
by neophyte
HAHAHAHAHAHAHAHAHA
Posted: Sat Mar 26, 2005 11:46 am
by feyd
seriously.
Posted: Sat Mar 26, 2005 12:04 pm
by neophyte
So, basically there is no way around it. The only alternative is to make your own in the first place. Is there a way to store the temporarily?
Posted: Sat Mar 26, 2005 12:24 pm
by Ambush Commander
Well, from what I gather, all you need are group permissions / owner permissions to read/write/execute, so 0770 would be fine?
Posted: Sat Mar 26, 2005 1:22 pm
by neophyte
I tried that. Didn't work on my server. Only 777. I've never successfully written a file on anything but 0777.
Posted: Sat Mar 26, 2005 3:00 pm
by Roja
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.