dariussutherland Posted June 13, 2011 Share Posted June 13, 2011 Need some help with permissions...Posted in a few forums, but alas noooooo help Have a multiple upload form, everything seems fine. I have never recieved the error personally on 2 different machines running the web form. But every now and then I get the : receiving directory insuffiecient permission I create user directories on the fly, then upload to tmp area, then move the files to the correct directory. As above, this works most of the time but then sometime not.... Any thoughts on this appreciated? I am already creating the dir with 0777 and also unmask(ing) before the creation Quote Link to comment https://forums.phpfreaks.com/topic/239290-heeelpdreaded-upload-permissions/ Share on other sites More sharing options...
spiderwell Posted June 13, 2011 Share Posted June 13, 2011 my thoughts aren't much use to you, as all I am thinking is thats odd, and I hate intermittent errors! Quote Link to comment https://forums.phpfreaks.com/topic/239290-heeelpdreaded-upload-permissions/#findComment-1229317 Share on other sites More sharing options...
gizmola Posted June 13, 2011 Share Posted June 13, 2011 This error occurs when? on move_uploaded_file? What is the exact error message. Quote Link to comment https://forums.phpfreaks.com/topic/239290-heeelpdreaded-upload-permissions/#findComment-1229319 Share on other sites More sharing options...
dariussutherland Posted June 13, 2011 Author Share Posted June 13, 2011 Haven't actually got the php error, just custom recieving dir insufficient permissions... when I look at the conflicting folder properties no write permissions are set but it's 0764 Im now trying chmod("./".$dirName."/".$_FILES['Filedata']['name'], 0777); I've never got the error just users, so have to wait to see if that has fixed it.. Seems to set the directory with execute permissions. Maybe it should be 0755, ?? Thanks for the responses tho... Quote Link to comment https://forums.phpfreaks.com/topic/239290-heeelpdreaded-upload-permissions/#findComment-1229321 Share on other sites More sharing options...
dariussutherland Posted June 14, 2011 Author Share Posted June 14, 2011 Okay. I may be speaking to soon, hope not. But for anyone with similar problems...Even tho I created the dir with 0777 permisions. I still had to chmod the folder I was uploading to later to provide access. chmod($thisdir ."/" . $userdirectory, 0777); not sure if 0777 is the right permissions, it did give execute permissions once I looked at the properties of the folder via FTP... Quote Link to comment https://forums.phpfreaks.com/topic/239290-heeelpdreaded-upload-permissions/#findComment-1229492 Share on other sites More sharing options...
gizmola Posted June 14, 2011 Share Posted June 14, 2011 I doubt seriously that you need to do 0777. Who owns the directory? Apache? I'd try 0700 or 0770. There's no reason to make it world writeable. Quote Link to comment https://forums.phpfreaks.com/topic/239290-heeelpdreaded-upload-permissions/#findComment-1229664 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.