move_uploaded_file() failed to open stream: Permission denied


Warning: move_uploaded_file(…) : failed to open stream: Permission denied in …..
Warning: move_uploaded_file(): Unable to move
This problem occurs because the PHP program does not have permission to create files in the specified directory

The first solution:
chmod -r 755
Adjusts the target path permissions
The second solution
Find the owner of the Apache process, and then change the owner of the target path folder to be the owner of the Apache process
chown -R [owner] [directory]

Read More: