You need to change the directory permission so that web server process can change the directory.
To change ownership of the directory, use chown
:
chown -R user-id:group-id /path/to/the/directory
To see which user own the web server process (change httpd
accordingly):
ps aux | grep httpd | grep -v grep
OR
ps -efl | grep httpd | grep -v grep