Jump to content

File and Directory Permissions For PHP application


nadeemshafi9

Recommended Posts

Hello Guys

 

i am realy sick of playing with these permissions, when i think i understand them one minuit and the next they have changed there physics. I make the directory 0777 and then write the file then i make the file ??? i tried a few but they keep from being read im sure the file is ok i think i can handdle file permissions but i think its directory permissions im having a prob with.

 

Its an image file i write it and then need to use it so make the directory 0777 and then write the file and then what to the file and what to the directory ?

 

i am using php ftp() but if anyone knows any differences with php chmod() then please tell me apart from that i do a 777 righth now and leave it at that.

 

what should i being to the directory and file after to make it secure because i dont whant people tampering with them ?

 

OH AND THIS PROBS ON TH MAC OSX 10.4 TIGER

 

my chmoding works fine on linux the way it is 0777 and then a 655

 

+ somtimes i play with the permissions of the directory throgh the os GUI or the shell and i got it to tell me i dont have permissions in the OS but in PHP its ok is this coz PHP got ownership of it when i messed with the addtional BIT.

Link to comment
Share on other sites

yeh so i check and all the files made by php belong to the account nadeem which is my account which means its running under my account so whu dosent it work when i chmod 777 the directory, write the image file and then chmod 755 the image and then chmod 755 the directory UP TILl THEN evERYTHiNG IS FINE - then i open the image and crop it with that crop interface and then when i chmod directory 777 object.saveimage and chmod file 755 and directory 755 I CANT READ THE CROPPED IMAGE it says i dont have permissions to access that directory ????? works perf if i chmod 777 all the way but thats not a good idea so i need this resolved it seems to work on the red hat box.

 

OH by the way that crop image class and interface uses the GD library or whatever its called to save the image is that somthing that may affect it ?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.