Permissions on apache2 directory I was working through these instructions to get my web server working again and needed to change the /etc/apache2/httpd.conf file.

I needed to change the permission on httpd.conf file and did. Next I attempted to edit /etc/apache2/httpd.conf. I could not because I didn't have permission to change things in the /etc/apache2 directory. So I tried a chmod 666 on the /etc/apache2 directory.  Now I cannot see any contents in finder in the /etc/apache2/ directory. The permissions I can see on the directory are: drw-rw-rw-. In Finder it shows as a custom permissions.

I need to change the permissions on /etc/apache2 but to what?
I didn't have permission to change things in the apache2 directory.


Because the directory is owned by root user and not the logged-in user.


  Now I cannot see any contents in finder in the apache2 directory.


Because the current permission is on apache2 directory is drw-rw-rw-, hence you cannot change (cd) into that directory, as you are missing the execute (x) permission bit. Add the execute permission to be able to change to apache2 directory. Execute the following command-line:

sudo chmod a+x /etc/apache2

To edit the httpd.conf (or any other file), use sudo, like:

sudo vim /etc/apache2/httpd.conf