PHP move_uploaded_files permission denied

This turned out to be a fairly simple fix after much frustration.

I did this in ssh, so if you don’t have that, you’ll have to find another article.

open ssh, cd to your web root.

type ls -l

to see all the permissions. ¬†You’ll see come stuff like -rw-ww- owner group 4096 time filename

you’ll need to change your upload directory to have the same group and owner as your other web files.

So let’s get started

mkdir data

chown owner

chgrp group

chmod 777 data

That’s it.

replace “data” with your folder name

replace “owner” and “group” to match the settings from when you did ls -l