【问题标题】:unable to reset permissions on mac (el capitan) for /tmp folder无法在 mac (el capitan) 上为 /tmp 文件夹重置权限
【发布时间】:2017-02-12 22:26:27
【问题描述】:

在我的 mac 上,mysql 在我重新启动后突然停止工作。 经过大量搜索,我检查了我的文件权限是否混乱,因为无法在 tmp 中创建 mysql 套接字文件

我尝试按照 url 使用以下命令重置权限

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

结果:

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

谁能知道我该如何解决这个问题? 我希望 mysql 在我的机器上运行。

【问题讨论】:

  • 您的/tmp 是符号链接而不是常规目录吗?
  • 是的,它显示:lrwxr-xr-x@ 1 root wheel 11 Sep 17 2015 /tmp -> private/tmp

标签: mysql macos osx-elcapitan tmp


【解决方案1】:

通过以下 URL 中提供的步骤解决了此问题: https://www.reddit.com/r/mac/comments/55s9yg/getting_an_error_message_on_startup_coretelephony/

这是 var catalog '/tmp' 的权限问题。 如果您尝试更改此目录的权限,OS X 不会让此更改,因为系统中有“系统完整性保护”。在您更改权限之前,必须禁用此 SIP。

试试这个:

  1. 通过重新启动计算机并按住 Command+R 直到 Apple 徽标出现在屏幕上,将 Mac 重新启动到恢复模式。
  2. 单击实用程序 > 终端。在终端窗口中,输入“csrutil disable”并按 Enter。重新启动您的 Mac。
  3. 重新启动 Mac 后,尝试更改手册(命令:'sudo chmod 1777 /tmp')或下载应用程序:(我推荐这个实用程序来执行此操作:OnyX 3.1.8 for OS X 10.11 El Capitan - 下载链接: http://joel.barriere.pagesperso-orange.fr/download/1011/OnyX.dmg ) 5.1 在应用程序中,选择维护 -> 权限,然后点击执行。这修复了所有权限问题(包括更改权限 '/tmp' 以更正)。
  4. 进程结束后,执行命令 'sudo chmod 1777 /tmp' 有效,只需重新启动 Mac。
  5. 现在,当您更改权限时,需要启用“系统完整性” 保护',改为:'csrutil enable'
  6. 重新启动您的 Mac 并按住 Command+R 直到 Apple 徽标出现在您的屏幕上。单击实用程序 > 终端。在终端窗口中,输入“csrutil enable”并按 Enter。重新启动您的 Mac。完成了:-)它会工作的:-)

【讨论】:

    猜你喜欢
    • 2016-09-19
    • 2017-01-31
    • 2015-12-30
    • 2016-03-06
    • 1970-01-01
    • 2015-08-26
    • 2019-11-03
    • 2016-03-28
    相关资源
    最近更新 更多