Search code examples
mysqlmacososx-elcapitantmp

unable to reset permissions on mac (el capitan) for /tmp folder


On my mac, mysql suddenly stopped working after I reboot. After a lot of search, I checked my file permissions are messed up due to which mysql socket file was unable to create in tmp

I tried resetting permissions using following command as per this url

/usr/libexec/repair_packages --repair --standard-pkgs --volume /

result:

Permissions differ on "tmp", should be drwxrwxrwt , they are lrwxr-xr-x . Unable to set owner & group on "tmp". Error 1: Operation not permitted Unable to set permissions on "tmp". Error 1: Operation not permitted ACL found but not expected on 'System'. Unable to set owner & group on "System". Error 1: Operation not permitted Unable to set permissions on "System". Error 1: Operation not permitted

can anyone know how I can fix this? I want mysql to run on my machine.


Solution

  • Fixed this issue with steps provided in following URL: https://www.reddit.com/r/mac/comments/55s9yg/getting_an_error_message_on_startup_coretelephony/

    This is permission problem with var catalog '/tmp'. If You try to change permission this catalog, OS X do not let this change because, in system there is 'System Integrity Protection'. This SIP must be disabled before You change permission.

    Try this:

    1. Reboot your Mac into Recovery Mode by restarting your computer and holding down Command+R until the Apple logo appears on your screen.
    2. Click Utilities > Terminal. In the Terminal window, type in 'csrutil disable' and press Enter. Restart your Mac.
    3. After restart Mac, try to change manual ( command: 'sudo chmod 1777 /tmp' ) or download app: ( I recommended this utility app to do this: OnyX 3.1.8 for OS X 10.11 El Capitan - download link: http://joel.barriere.pagesperso-orange.fr/download/1011/OnyX.dmg ) 5.1 In the app, select Maintenance -> Permissions, and hit Execute. This fixes all permission problems ( including changes permission '/tmp' to correct ).
    4. When the process is over do command 'sudo chmod 1777 /tmp' works , just reboot Mac.
    5. Now, when You changed permission, need to Enable 'System Integrity Protection', change to: 'csrutil enable'
    6. Reboot your Mac and holding down Command+R until the Apple logo appears on your screen. Click Utilities > Terminal. In the Terminal window, type in 'csrutil enable' and press Enter. Restart your Mac. It's done :-) It will be work :-)