PHP move_uploaded_file() permission issue

SONYFX

Senior member
May 14, 2003
403
0
0
I have employed a page to upload files on my website.

But I'm having problems using it. When the file is uploaded to the 'tmp' directory of my account, and when I use the function 'move_uploaded_file()' to move this file into the actual directory, it returns the error

move_uploaded_file(ABC.jpg): failed to open stream: Permission denied
move_uploaded_file(): Unable to move '/tmp/phpF5SqzC' to 'ABD.jpg'

please help me what should now I do with this..

I also tried changing the mode of the 'temp' directory to 777, but it still didn't work.
 

MrScott81

Golden Member
Aug 31, 2001
1,891
0
76
Actually, I think the permissions problem is not with your tmp directory, but rather whatever directory you're trying to move it to.