can't get permissions to edit httpd.conf

Joined
Jun 11, 2012
Messages
302
Reaction score
15
Points
18
hi, am on mac os 10.6.8....

how do I change permissions to this file, /etc/apache2/httpd.conf in Finder in Get Info

when I do Get Info the only options for changing permissions are:

system -- is set to "Read & Write"
wheel (????? that's not my username) -- is set to "Read & Write"
everyone -- is set to "Read Only" and the only one other option on the drop-down is "no access")

so..... what do I change in order to be able to edit this file?

thank you...
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,246
Reaction score
1,834
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
You can't edit that file or change it. It's locked to the system only. The only way to make any changes to any of the files or folders in /etc is to log on as "Root". Making changes to files or folders that are system locked could result in your system not being able to boot.

Besides all that, you're way, way, behind with OS X by still running Snow Leopard.
 
Joined
Apr 16, 2016
Messages
1,096
Reaction score
51
Points
48
Location
CT
Your Mac's Specs
MacBook Air Mid-2012 / iMac Retina 5K Late-2014
https://codex.wordpress.org/Installing_WordPress_Locally_on_Your_Mac_With_MAMP

The default apache2 service should NOT be modified unless you know EXACTLY what you are doing. You should follow one of two options to accomplish your goal:


- https://codex.wordpress.org/Installing_WordPress_Locally_on_Your_Mac_With_MAMP

- Install Oracle VirtualBox (Type II Hypervisor) on your Mac then install Linux in a virtual machine -inside- of VirtualBox. Muck around with Apache on the Linux machine all you want. And, using the correct network settings for the virtual guest, you'll be able to browse to the WordPress site on the Linux host from your Mac or even other machines on the local network.
 
Joined
Apr 16, 2016
Messages
1,096
Reaction score
51
Points
48
Location
CT
Your Mac's Specs
MacBook Air Mid-2012 / iMac Retina 5K Late-2014
oh brother... I don't believe how complicated this is... every time I try to start seriously working with WP I run into all these complications.....:-((


I already have PHP env and mySQL running fine on my machine, namely:

PHP 5.3.26 (running on an Apache server)
(both came out of the box)

and mySQL 5.5.9 (I downloaded myself when I got this mac years ago)

now I want to install wordpress and run a wp site locally on my mac in these same PHP & mySQL env's
(I can connect to a mySQL db from PHP env w/no problems..)
(so I don't want to "reinvent the wheel" by installing MAMP (which most instructions to do say to do) since I already can run PHP websites on my machine fine without it...


so: for anyone who's familiar with these very delicate config files you're aren't supposed to touch ;~)
(I've been running Tomcat (for J2EE env) also in my machine, for over 10 years, I can touch all the config files I want.. never a problem....;~))

I actually may not have to edit this file at all: because the instructions mentioned above say to un-comment this line:

PHP:
LoadModule php5_module libexec/apache2/libphp5.so

but the line is un-commented already... only thing is, there are a lot blanks places before "libexec/apache2/libphp5.so" -- does this matter? b/c this is what I was trying to do: remove those extraneous spaces......

thank you.....

The Mac operating system has been secured to protect the system. Making changes like what you're after have the potential to open up a variety of vulnerabilities. I'm a seasoned veteran with Linux and other similar operating systems (like BSD, upon which Mac OS is built) and I would never think of modifying core files like that on my Mac machines. If you aren't interested in MAMP, then absolute safest option is to go the route of VirtualBox and Linux as I described.

Personally, I hate WordPress. And I hate CMS development too. Both of these things have the potential to create a mess on whatever system you're doing the work on. Having a "disposable" linux machine, especially one you can easily snapshot before making significant changes, is quite beneficial.

In the end, believe it. It's complicated. You're taking on the process of running a server-side environment on a workstation type device. That's not something to take lightly.
 
OP
K
Joined
Jun 11, 2012
Messages
302
Reaction score
15
Points
18
hi Ember,

thank you for your response......

I also hate WP (and I have also always hated CMS's, WYSIWYGs); I have always always hand-coded, but in my situation now (I'm retired and living in South America), WP is a good thing to know, most freelance gigs here, the people want their sites to be done in WP, and at any rate, the site I will be building is for a small business, and it will include cc purchases; I'have never done this (have never implemented something like this entirely on my own); and I want to learn WP anyway, it's a useful skill to have here, so I thought this would be a good opportunity to do so (the alternative would be my "classic" way: PHP, just like that, no frameworks... jQuery for front-end functionality; regular hosting, FTP file transfer, the usual... but I would need to implement db and the cc (e-commerce) feature (it's for a small biz that sells wholesale jewelry) so I'd like to try WP (also want to check out how they implement db... and at any rate WP runs on PHP, another plus, I guess....;~)

the reason I'm reluctant to do more than bare-bones tinkering with config files, etc here, instead of "reinventing the wheel" and installing things like MAMP, is that I don't want whatever I do to affect the running of the sites I currently have in my PHP env (or to affect how mySQL works too.. one time years ago I installed XAMP, I think, it came with mySQL.. I already had mySQL installed; it never worked again after I had installed XAMP that came with mySQL.. I just don't want something like this to happen...) so I'm trying to do it the "minimalist" way...;~))

so to your suggestions:

Install Oracle VirtualBox (Type II Hypervisor) on your Mac then install Linux in a virtual machine -inside- of VirtualBox. Muck around with Apache on the Linux machine all you want.

this "mucking around with Apache" cannot be done on the unix shell?

"....Oracle VirtualBox (Type II Hypervisor)..."

what is this exactly, please?

and would this affect the running of my websites in my PHP env I descbribed in my previous post?

" Having a "disposable" linux machine, especially one you can easily snapshot before making significant changes, is quite beneficial...."

a "disposable" linux machine???? I have worked with Linux.....


thank you.....
 
OP
K
Joined
Jun 11, 2012
Messages
302
Reaction score
15
Points
18
PS: I still would like to know if those extra spaces in a command line in httpd.conf are ok........

thank you.....
 
Joined
Apr 16, 2016
Messages
1,096
Reaction score
51
Points
48
Location
CT
Your Mac's Specs
MacBook Air Mid-2012 / iMac Retina 5K Late-2014
hi Ember,

thank you for your response......

I also hate WP (and I have also always hated CMS's, WYSIWYGs); I have always always hand-coded, but in my situation now (I'm retired and living in South America), WP is a good thing to know, most freelance gigs here, the people want their sites to be done in WP, and at any rate, the site I will be building is for a small business, and it will include cc purchases; I'have never done this (have never implemented something like this entirely on my own); and I want to learn WP anyway, it's a useful skill to have here, so I thought this would be a good opportunity to do so (the alternative would be my "classic" way: PHP, just like that, no frameworks... jQuery for front-end functionality; regular hosting, FTP file transfer, the usual... but I would need to implement db and the cc (e-commerce) feature (it's for a small biz that sells wholesale jewelry) so I'd like to try WP (also want to check out how they implement db... and at any rate WP runs on PHP, another plus, I guess....;~)

the reason I'm reluctant to do more than bare-bones tinkering with config files, etc here, instead of "reinventing the wheel" and installing things like MAMP, is that I don't want whatever I do to affect the running of the sites I currently have in my PHP env (or to affect how mySQL works too.. one time years ago I installed XAMP, I think, it came with mySQL.. I already had mySQL installed; it never worked again after I had installed XAMP that came with mySQL.. I just don't want something like this to happen...) so I'm trying to do it the "minimalist" way...;~))

so to your suggestions:



this "mucking around with Apache" cannot be done on the unix shell?



what is this exactly, please?

and would this affect the running of my websites in my PHP env I descbribed in my previous post?



a "disposable" linux machine???? I have worked with Linux.....


thank you.....

Hypervisors are software that are designed to run virtual machines. A Type I hypervisor installs on "bare metal" (the base computer) and -is- the operating system for the box as a whole. Booting up a machine that is built with a Type I hypervisor results in a system that is ready to have operating systems installed on it but doesn't "do" anything for you natively. A Type II hypervisor is software that installs into an existing operating system (Windows, Linux, Mac) that then makes it possible to create and run virtual machines inside of it. The difference is that a Type I hypervisor "owns" the box while a Type II hypervisor lets you add functionality to an existing system.

In the scenario you are describing, use of a Type II hypervisor (Oracle VirtualBox, free) and an add-on virtual machine (Linux, free) gives you an excellent development environment with the ability to "protect yourself" from large changes that break things because you can shut down the Linux host and take a snapshot of it. Boot it back up, make your changes, and have the ability to revert back to the snapshot (before your changes) if something goes wrong.

Even though the machine is running within the OS of your Mac, it can be configured to appear as though it is directly connected to your network. You can use a web browser on your Mac to connect to the Apache instance, you can ssh into the OS for terminal access, and the Linux instance can provide 100% of the same functionality as if it were installed onto a physical machine. MySQL, Apache, PHP, Tomcat, Java... it's all available and it all works exactly as you'd expect.

If you're looking to take on freelance WP dev jobs, you could also have a "base snapshot" that you use to create new dev environments for your different projects. Just "make a copy" and you're up and running in a clean environment very quickly.

The benefits of virtualization are significant - I would strongly urge you to explore this.

Blank spaces in an httpd.conf file are ignored.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top