WTFranklin Posted April 26, 2011 Share Posted April 26, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/234766-exec/ Share on other sites More sharing options...
fugix Posted April 26, 2011 Share Posted April 26, 2011 look into the chmod() function Quote Link to comment https://forums.phpfreaks.com/topic/234766-exec/#findComment-1206524 Share on other sites More sharing options...
WTFranklin Posted April 26, 2011 Author Share Posted April 26, 2011 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! Quote Link to comment https://forums.phpfreaks.com/topic/234766-exec/#findComment-1206550 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.