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

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

问题描述

我是php,mysql的新手.我已经写了一个hello.php脚本,我试图将其复制到/var/www目录中(稍后将要通过Web浏览器打开它).相同的问题是,尽管我是根用户,但仍不允许在/var/www中保存/写入任何文件.我尝试在这个问题中实施步骤,但是在处理第三行

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

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

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

有什么问题的建议吗?

推荐答案

例如* unix权限的内容,通过输入

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天全站免登陆