2017-02-24 75 views
0

我正在关注this guide,以便我可以在OS-X El Capitan上使用Apache在本地服务器上运行网站。我想编辑我的httpd-userdir.conf文件,但是当我试图挽救它给我的错误:Apache:编写httpd-userdir.conf时出错:权限被拒绝

写入错误的httpd-userdir.conf:权限被拒绝

终端显示的权限对于我的httpd-userdir.conf文件是-rw-r-r--,所以我不明白为什么我不会被允许写入?

drwxr-xr-x 15 root wheel 510B Feb 24 13:35 ./ 
drwxr-xr-x 11 root wheel 374B Feb 24 13:27 ../ 
-rw-r--r-- 1 root wheel 2.8K Jul 31 2015 httpd-autoindex.conf 
-rw-r--r-- 1 root wheel 1.7K Jul 31 2015 httpd-dav.conf 
-rw-r--r-- 1 root wheel 2.9K Jul 31 2015 httpd-default.conf 
-rw-r--r-- 1 root wheel 1.1K Jul 31 2015 httpd-info.conf 
-rw-r--r-- 1 root wheel 5.0K Jul 31 2015 httpd-languages.conf 
-rw-r--r-- 1 root wheel 1.0K Jul 31 2015 httpd-manual.conf 
-rw-r--r-- 1 root wheel 4.4K Jul 31 2015 httpd-mpm.conf 
-rw-r--r-- 1 root wheel 2.2K Jul 31 2015 httpd-multilang-errordoc.conf 
-rw-r--r-- 1 root wheel 13K Jul 31 2015 httpd-ssl.conf 
-rw-r--r-- 1 root wheel 607B Jul 31 2015 httpd-userdir.conf 
-rw-r--r-- 1 root wheel 607B Feb 24 13:35 httpd-userdir.conf.bak 
-rw-r--r-- 1 root wheel 1.5K Jul 31 2015 httpd-vhosts.conf 
-rw-r--r-- 1 root wheel 3.1K Jul 31 2015 proxy-html.conf 
+0

向我们展示完整的'ls -alhp'列表。几乎可以确保该文件由root拥有 - 您需要执行'sudo vi/path/to/httpd-userdir.conf' – erapert

回答

0

@erapert是正确的,我只是做须藤六/etc/apache2/extra/httpd-userdir.conf和,让我来编辑文件。