PHP Warning: move_uploaded_file() unable to move

∥☆過路亽.° 提交于 2019-11-26 22:44:58
Niclas Larsson

Change upload permissions for /var/www/media2net/uploads/ either by changing owner with "chown" or by "chmod"

Examples

$ sudo chown apache:apache /var/www/media2net/uploads/
$ sudo chmod 755 /var/www/media2net/uploads/

Also, if downloaded_file.png already exists in that directory and it's owned by another user, then you would need to change ownership on that file as well.

$ sudo chown apache:apache /var/www/media2net/uploads/downloaded_file.png

This way, it can be successfully overwritten by Apache.

This solved the problem for me:

$ sudo chown -R www-data:www-data /var/www/html/
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!