如何解决/var/www 复制/写入权限被拒绝? [英] How to resolve /var/www copy/write permission denied?

查看:23
本文介绍了如何解决/var/www 复制/写入权限被拒绝?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 php、mysql 的新手.我编写了一个 hello.php 脚本,我试图将其复制到/var/www 目录中(稍后将希望通过 Web 浏览器打开它).同样的问题是,尽管我是 root,但我不允许在/var/www 中保存/写入任何文件.我尝试在this问题中实施步骤,但是当我处理第三行时出现以下错误

I am a newbie in php, mysql. I have written a hello.php script, which I am trying to copy into /var/www directory (and will later want to open it through web browser). The problem with the same is that I am not allowed to save/write any files in /var/www despite me being the root. I tried implementing steps in this question, but I get the following error when I process the third line

find /var/www/ -type f -exec chmod g+w '{}' ';'
chmod: changing permissions of `/var/www/index.html': Operation not permitted

我知道符号链接也是一种选择.我希望能够将文件直接写入/复制到/var/www/目录.

I know symlink is also an option. I would want to be able to write/copy files directly to /var/www/ directory.

对出了什么问题有什么建议吗?

Any suggestions on what is going wrong?

推荐答案

*unix 权限问题,获取 root 访问权限,例如通过键入

it'matter of *unix permissions, gain root acces, for example by typing

sudo su
[then type your password]

并尝试做你必须做的事情

and try to do what you have to do

这篇关于如何解决/var/www 复制/写入权限被拒绝?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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