douyue6520
douyue6520
2013-06-23 03:07
浏览 53
已采纳

move_uploaded_file给出:无法打开流:权限被拒绝

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.

图片转代码服务由CSDN问答提供 功能建议

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

 警告:move_uploaded_file(/var/www/data/user-blue.png):无法打开流:
 
拒绝授权 第67行上的/var/www/upload.php 
 
 
 
警告:move_uploaded_file():无法将'/ tmp / phpVBiLvB'移动到'/var/www/data/user-blue.png'/ 第67行的var / www / upload.php 
   
 
 

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

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • douchuopiao9002
    douchuopiao9002 2013-06-28 00:34
    已采纳

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

    点赞 评论

相关推荐