Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I was trying to allow for my server to use the RewriteEngine in an .htaccess file so I went into /private/etc/apache2 and tried to edit the httpd.conf file, but did not have permission.

So I duplicated it, made my edits then saved to Desktop.

I then moved to the httpd.conf file into the same directory as the old. It did not ask me to replace. I then deleted the old file, and now my computer will no longer connect to localhost server.

What should I do to remedy this?

I notice that there is a httpd.conf.bak file in the same directory which appears to be a backup with system and wheel group privileges. I'm not sure how I restore httpd.conf with this while retaining system and wheel group privileges.

Thank you for any help that you can give me. I'm not familiar in this area at all.

share|improve this question

migrated from stackoverflow.com Dec 9 '12 at 21:10

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

you can change the owner and group of any file from the console with the chown command:

$chown system:wheel http.conf

Depending what you're doing you might need to execute this with sudo, as in:

$sudo chown system:wheel http.conf

which will ask you for your password, assuming you are the administrator of your own system.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.