PHP:move_uploaded_file():无法移动'/ [英] PHP: move_uploaded_file(): Unable to move '/

查看:99
本文介绍了PHP:move_uploaded_file():无法移动'/的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在刚安装的新服务器上不断收到此错误

I keep getting this error on a new server I just setup

[Wed Feb 16 22:46:51 2011] [error] [client 71.1.236.114] PHP Warning:  
move_uploaded_file(upload/110216104651_00134_smooth_1440x900.jpg): 
failed to open stream: Permission denied in /var/www/admin/_application/models/Roles.model on line 1757, 
referer: http://nacc.biz/admin/admin/modifyarticle.php?roleid=4
[Wed Feb 16 22:46:51 2011] [error] [client 71.1.236.114] PHP Warning:  move_uploaded_file():
Unable to move '/tmp/php6wlOg1' to    'upload/110216104651_00134_smooth_1440x900.jpg' 
in /var/www/admin/_application/models/Roles.model on line 1757, referer:
http://nacc.biz/admin/admin/modifyarticle.php?roleid=4
[Wed Feb 16 22:46:51 2011] [error] [client 71.1.236.114] PHP Notice:  
Upload Error: Error moving from temp dir in /var/www/admin/_application/models/Roles.model on line 1759,
referer: http://nacc.biz/admin/admin/modifyarticle.php?roleid=4

我添加了777并创建了一个上载目录,但错误仍然存​​在.如何找到需要更正或创建的路径?

I added 777 and created a uploads dir, but the error persists. How do I find the path that needs to either be corrected or created?

推荐答案

upload/的所有者更改为www-data:www-data,并将chmod更改为755

Change owner of upload/ to www-data:www-data and also chmod to 755

这篇关于PHP:move_uploaded_file():无法移动'/的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆