Jump to content

exec()


WTFranklin

Recommended Posts

Hello, I was just seeing if someone could push me in the right direction. I have a form that uploads items to a database and it also includes uploading images to a directory as a part of that. That all works, but I was thinking for security it'd be best not to leave that directory as 0777 for permissions. In researching this I found the exec() function. I'm still figuring out the relation of who the permissions are associated with and why. All I know is if the directory has 0777 for permissions my script works just fine. I was just seeing if using exec to change the permissions during the process of uploading the images and then change back would be cumbersome and leave open other problems (there won't be any user-based input being passed to that) or if that actually would be the way to go for this.

 

Thanks!

-Frank

Link to comment
Share on other sites

Hi Fugix, thanks for the response. I actually was trying to use chmod() but it was giving me an error saying it wasn't enabled. Is that something I could change just for that script with ini_set()? Or would I have to contact the hosting company for that?

 

Thanks!

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.