Jump to content

Recommended Posts

hi everyone

 

I'm not sure if this is the right place for this question but here goes:

 

I am currently working on an image upload script and i wanted to set the permissions for the target folder to 777 within the upload script and set it back to what it was after, so that i dont up the security risks of the site. However the hosting company wont seem to allow me to use the chmod function to change the permissions.

 

They keep saying i need to set the folders permissions to 777 with my ftp but this isnt safe right? is there some kind of work around in this situation? any help/advice would be great.

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/195015-image-upload-permissions/
Share on other sites

just to add to this, am i right in saying that i need to set the tmp folder and the folder that i move it to to 777. or does the move_uploaded_file function work even if the target folder is not 777?

 

the hosting company have said that setting the temp folder to 777 and leaving all others the same is standard, thats how all other hosting companies make use of the temp folder. is that correct?

 

hi stephen

 

thanks for replying, i was given the impression that setting folders to 777 permanently through ftp to allow file uploads was unsafe because it allowed others to upload malicious scripts to do damage to your site/database etc.

 

is that what other developers do? set their folders to 777 and leave them like that?

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.