maddie
maddie

Reputation: 1954

Apache: Error writing httpd-userdir.conf: Permission denied

I'm following this guide so that I can run websites on a local server using Apache on OS-X El Capitan. I'm trying to edit my httpd-userdir.conf file but when I try to save it gives me the error:

Error writing httpd-userdir.conf: Permission denied

Terminal shows that the permissions for my httpd-userdir.conf file is -rw-r--r-- , so I don't understand why I wouldn't be allowed to write?

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

Upvotes: 1

Views: 1972

Answers (1)

maddie
maddie

Reputation: 1954

@erapert was correct, I just had to do sudo vi /etc/apache2/extra/httpd-userdir.conf and that allowed me to edit the file.

Upvotes: 2

Related Questions