permission denied for /etc/apache2/httpd.conf

i am trying to edit the /etc/apache2/httpd.conf on mac os x 10.9.2,
as i an installing php, but i have permission denied using terminal, please any ideas on what is happening, i have created my user .conf as

<Directory “/Users/username/Sites/”>
Options Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>

This forums are for openSUSE (Linux), not MacOS X!

Anyway, you would need root permissions for editing /etc/apache2/httpd.conf.
I don’t know MacOS good enough to be able to give advise, but probably you can use “sudo” to start the text editor as root, or use “su” to gain root privileges (maybe you need “su -” though).

thanks for the time and effort

Does OS X have sudo? I think it has “Vi”, doesn’t it?

You could run “sudo su” to change to root if you don’t know or do not have root’s password.

Depends on sudo’s configuration.
Try to do that on a default openSUSE installation f.e. and you would still need root’s password, so the “sudo” would in fact be superfluous in “sudo su”.

And you could of course just run “sudo vim” as well, no need for “sudo su”… :wink:

On 2014-04-15 20:26, wolfi323 wrote:
>
> dragonbite;2637143 Wrote:
>> You could run “sudo su” to change to root if you don’t know or do not
>> have root’s password.
> Depends on sudo’s configuration.
> Try to do that on a default openSUSE installation f.e. and you would
> still need root’s password, so the “sudo” would in fact be superfluous
> in “sudo su”.

But in Ubuntu world, it asks for the user password, so that is indeed
the trick to get a root terminal. That way you can create a password for
root, and from then on, use “su” instead.

On a MAC? No idea.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

I know, that’s why I said it depends on sudo’s configuration.

And I too have no idea how it is configured on MacOS, nor whether it is available.