Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

All was well until 10.7 + MAMP + xCode. Now...misery. Why?

I'm a port from the PC universe. Been loving my iMac since 10.6 for about 2 years now. Recently, I decided to stop programming on the PC and move to the Mac and open source, namely PHP to start. That mean installing MAMP. No harm. Then, I entered the world of debuggin PHP without a debugger. Not fun. So, I joined the installed xDebug. Whoa! Problems all over. Issues Galore. Addressed the issues, joined the $99 developer community, downloaded xCode (for the compiler), upgraded to 10.7 Lion and fixed all sorts of stuff: paths, ini files, got pear working, php-config, phpize, xdebug.so extension.


Now that xdebug works, I downloaded JetBrains PHPStorm for my debugger along with Dreamweaver CS4 that I've owned all along. All should be well and good, but not so.


1. All of my Adobe CS products went to ****. I had to re-install and lost 2 yrs worth of customizations, plug-ins etc. That was Adobe's best suggestion.

2. My external disk drives locked up, there were now permission issues on all, but my internal drive, so I couldn't get to my Time Machine backups. In any case, I had changed so much I'm not sure it would have helped.

3. Reformatted all external drives. Lost all, but nothing there was that precious. One drive is a scratch disk, the other was my backups. I immediately made another TM backup. All went well after re-format.

4. Download OS X.7.3....Whoa, more issues. Mainly permissions. Adobe went to **** again, but I'd already lost everything that mattered, so I trudged through the permissions thing (Library and System seemed to be the primary offenders here). User System now exists everywhere and user "Me" is gone, as is user "Administrators" group. Tried getting rid of user system. Bad, bad idea. Started over, then just tried to add Me and Administrators group. Worked out.

5. Reinstalled Adobe a 2nd time.

6. Now, some of my drivers, namely HP Scanjet aren't working, download, reinstall, fix that.

7. Reinstalling HP drivers mucked up permissions again and I get all these Library permission issues on bootup. Fixed that for the 3rd or 4th time now.


There's more, but you get the idea. All I wanted to do in the beginning was use PHP 5.3 and be able to debug it. Now I have a "hard way" degree in debugging, Unix, and the mac OS. And, I still don't know what I've done wrong.


This permissions issue keeps cropping up. I've done the Verify/Repair Permissions thing a few times, same for the hard drive. doesn't seem to have an noticible effect.


Is there some sort of utility out there (or already here) that will help me get my machine stable once again. I've logged probably 40 hours doing the above and this is darn near reminding me of my life with a PC--but I had 30 years of driving that crate, so it wasn't as frustrating.


It's all about permissions and my user being installed, or not, in various locations that I'm guessing it used to be installed in. Plus, it seems RW permissions have changed to R. I've used Terminal to fix some of this along the way, and get all working correctly, but I'm scared now to turn off the darn machine, or to upgrade "anything" on it.


Advice is welcome.


Regards and thanks to all.


Dan


PS: Crap, I see a 10.7.4 on the OS dropdown. I could have gone all night without seeing that!

iMac (27-inch Late 2009), Mac OS X (10.7.3)

Posted on May 13, 2012 8:27 PM

Reply
15 replies

May 13, 2012 11:28 PM in response to Linc Davis

Permissions mucked up: When I boot the computer, I get error messages that the permissions are wrong in /Library/StartupItems. I open info to Library and see my username and the Admins group. I open the info to StartupItems and the Admin group is there along with system twice as RW. then Wheel (I have no idea what wheel is) and then everyone both as R access. Then, above the name list and below the Sharing and Permissions area dropdown, there is a message that says "You have custom permissions".


I unlock and change these settings to a) add me to the list as RW and b) make me the owner of the folder. Then I select "apply to enclosed items". By the way, adding me is not a one click deal. I can click on my username a dozen times and nothing happens. Wait a few minutes, click on it once and I show up with R permission. Which I change to RW. Then, I reboot. All is well on reboot.


I notice that my Adobe CS4 install will no longer allow me into any of the apps. I reinstall this from the disks and reboot. I get the error messages from /Library/StartupItems/ again. Go back to that and all is as it was before I changed anything. So I change all again. Reboot. All works.


Then, I notice my scanner HP5590 won't work, so I attempt to install the OS X.7 patch. Install fails, says there are permission issues with the installer. Haven't figured this out, but there are some HP files in the /Library/Startup/ folder area. I go back to the /Library/Startup/ and check on info just to see, and sure enough, back to square one again. Adobe (which was just loaded) won't work again either.


This sort of thing began after upgrading to Lion. I worked it all out, then added the 7.3 patch, and went through the whole drill again. At first it was more subdir in the Library and System folder that were giving me issues, but since I downloaded the "Combo" install of 7.3, a lot of those have gone away.


This time I spent 3 hrs restoring a time machine backup of the entire HD from earlier today, when the system was behaving. Backup restore np. However, permissions and Adobe software are back to square one and the Adobe was working earlier today. When I reinstall from DVDs it will work fine again until next time.



Hope that helps.

May 13, 2012 11:54 PM in response to _Kao

Thanks Kao.


I'll need more detail there. Xcode is np. I don't have any customizations to it. MAMP on the otherhand could be an issue. PHP.ini understood np. But, there were a lot of other mods all over the place in MAMP.


I modified the path to point to PHP 5.3 instead of 5.2.7 that came on the machine. So, I could copy the /private/etc/paths file somewhere else. I put the MAMP paths higher in the file so the path would find them first. I don't know if a MAMP reinstall would affect that file or not.


I installed something call m4-1.4.16 in the /usr folder. That was needed to get xDebug compiled. I don't think MAMP reinstall will affect that.


Then there was something named "autoconf" or something like that which had to be installed to compile xDebug. There were version issues with the xDebug .so as I recall. I did so much, that I'm not sure of the order. However, copying the path file and the php.ini file to another location, uninstalling and reinstalling is certainly doable, but I'm not sure how this will fix the /Library/StartupItems/ issue or the permissions continually resetting on me.


Thanks,

Dan

May 14, 2012 1:16 AM in response to ArtemusReturns

Backup the htdocs folder, which I guess is the only thing really important, since you will probably need to install extensions to MAMP afterwards aswell.


Are you using multiple users on you'r machine, and have you made sure that you're user is the owner of the folders causing the trouble?


To do this open up Terminal and type:


chown -r [username] [dirname]


May 14, 2012 6:32 AM in response to ArtemusReturns

It sounds like you're randomly setting file permissions without any idea of what they should be. In nearly all cases, they should be whatever the software installer makes them. On very rare occasions, it may be necessary to repair the permissions of system files after running a defective third-party installer. It's certainly necessary if you've "mucked up" those permissions yourself. You may have mucked them up so badly that they can no longer be repaired in the usual way. In that case, boot from your recovery partition (command-R at startup) and run Disk Utility. That, at least, is safe from being mucked up, but it won't fix everything; only Mac OS system files.


If a third-party product doesn't work, reinstall it, and resist the temptation to change the permissions. If it still doesn't work, contact the developer for support.


Repairing the permissions of a home folder in Lion is a complicated procedure. I don’t know of a simpler one that always works.


Back up all data now. Before proceeding, you must be sure you can restore your system to its present state


Launch the Terminal application in any of the following ways:


Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)


In the Finder, select Go Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.


Open LaunchPad. Click Utilities, then Terminal in the page that opens.


Drag or copy — do not type — the following line into the Terminal window, then press return:


chmod -R -N ~


The command will take a noticeable amount of time to run. When a new line ending in a dollar sign ($) appears below what you entered, it’s done. You may see a few error messages about an “invalid argument” while the command is running. You can ignore those. If you get an error message with the words “Permission denied,” enter this:


sudo !!


You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up.


Next, boot from your recovery partition by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.


When the recovery desktop appears, select Utilities ▹ Terminal from the menu bar.


In the Terminal window, enter “resetpassword” (without the quotes) and press return. A Reset Password window opens. You’re not going to reset the password.


Select your boot volume if not already selected.


Select your username from the menu labeled Select the user account if not already selected.


Under Reset Home Directory Permissions and ACLs, click the Reset button.


Select ▹ Restart from the menu bar.

May 14, 2012 8:46 AM in response to Linc Davis

Thank you Linc for the patient response. I understand sudo, but what is sudo ! !?


Current status: I ran Disk Utility reset permissions 3 times just to be sure nothing was left not fixed. This took several hours the first time, an hour the 2nd, and about 20 min the 3rd time. It corrected a great deal.


I re-moved and reinstalled MAMP and xCode. Re-installed Adobe CS4. Re-installed HP 5590 scanner drivers per HP instructions.


The repaired permissions put the machine in a state that allowed all of this. Everything works, except the HP scanner. I'll contact HP as recommended on that.


the one rogue director and subdir that will not come around is /Library/StartupItems. It disables everything in there for not having correct permissions. the Sharing and Permission list has the same issue it keeps having. My user account is not there (although it is in the directories below StartupItems and it is there in the directory above the StartupItems (Library). System is listed twice, admin once for RW. wheel and everyone listed once for R. A message that "You have custom permissions" is there too.


I ran "sudo -R on /Library/StartupItems and it made me the owner. Something is continually overwriting that I suppose. It is this one directory that keeps misbehaving without fail.


I have not tried your most recent recommend yet. I thought I'd post this and see if the recommend still stands after reading the current state of the machins.


I've backed up all with Time Machine, but have not taken an image of the disk. Should I take an imiage of the 1TB disk with 190GB used as well?


Also: there is an ACL warning message that comes up throughout the Disk Utility permissions repair cycles. I don't know what ACL is, but I have read on the web that it isn't a big deal to leave it be and ignore the warning.


Having read the current state of things, if your most recent guidance still stands, let me know and I'll give it a whirl.


Again, thank you! And Kao too for that matter. I appreciate all this guidance. Lord knows, the 2" thick book I purchased on OS X.6 is nowhere near this specific.


Dan


PS: I'm going to catch a few winks now. It's been about 28 hrs at the computer (only the last 10 doing this sort of stuff).


PPS: Is there a "best book" on Terminal and the OS from this depth of perspective out there? I bought the "Missing Manual" series book on X.6. It's pretty good, deeper than most, but still not that deep as to all these Unix commands and certainly not as thorough as you are being. I haven't messed with Unix since the 80s and mainframes. Even then, it was seldom.

May 14, 2012 10:17 AM in response to ArtemusReturns

Back up all data again.


Drag or copy — do not type — the following line into the Terminal window, then press return:


sudo chown -R 0:0 /Library/StartupItems


Then enter this command in the same way:



sudo chmod -R a+rX,go-w !$



As a reference for the shell, read the sh(1) man page. Learning it is a gradual process, best accomplished by solving practical problems.



All was well until 10.7 + MAMP + xCode. Now...misery. Why?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.