php failed to open stream: Permission denied in move_uploaded_file

By

Published November 17, 2016 at 4:05 AM

If you have been working with this PHP POST method uploads

You will need a SSH client, I recommend Bitvise. You will also need to be sure SSH is enabled on your server and you have the SSH credentials to access your server. Most often the SSH credentials are different than your FTP credentials.

Once SSH connected run# "chmod 777 /the/location/of/your/destination/folder" Then hit enter
or if that does not work you can try:

Once SSH connected run# "sudo chown nobody /then/the/location/of/your/tmp/folder" Then hit enter
"sudo chown nobody /the/location/of/your/destination/folder" Then hit enter
"sudo chmod -R 0755 /the/location/of/your/destination/folder" Then hit enter
"sudo chmod -R 0755 /the/location/of/your/destination/folder" Then hit enter

And that should take care of your permissions problems.

Stack Exchange