move_uploaded_file给出:未能打开流:权限被拒绝 [英] move_uploaded_file gives: failed to open stream: Permission denied

查看:140
本文介绍了move_uploaded_file给出:未能打开流:权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用两台不同的服务器,并在它们之间上传文件。从一个到另一个。但是这是行不通的。当它们都在我的本地主机,但是当我想从我的本地主机上传文件到另一台服务器是云服务器。它给了我这个错误:

$ p $ 警告:move_uploaded_file(/var/www/data/user-blue.png):失败打开流:

在第67行的/var/www/upload.php中被拒绝的权限



警告:move_uploaded_file():无法在第67行将/var/www/upload.php中的'/ tmp / phpVBiLvB'移动到'/var/www/data/user-blue.png'中

如何修复云服务器上的权限?如果需要,我有完整的root权限。

解决方案

chmod在你的目录下读取执行。或者将用户权限授予te目录。

I am working with two different servers, and uploading files between them. From one to another. But that is not working. It worked when both are on my localhost, but when I want to upload file from my localhost onto another server that is a cloud server. It is giving me this error:

Warning:  move_uploaded_file(/var/www/data/user-blue.png): failed to open stream: 

Permission denied in /var/www/upload.php on line 67



Warning:  move_uploaded_file(): Unable to move '/tmp/phpVBiLvB' to '/var/www/data/user-blue.png' in /var/www/upload.php on line 67

How do I fix permissions on the cloud server? I have full root access if it is needed.

解决方案

chmod on your directory to read write execute. Or give user permissions to te directory.

这篇关于move_uploaded_file给出:未能打开流:权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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