WHAT'S NEW?
Loading...

「Mac」磁碟權限錯誤 displaypolicyd 無法喚醒螢幕


User differs on “private/var/db/displaypolicyd”; should be 0; user is 244.
Group differs on “private/var/db/displaypolicyd”; should be 0; group is 244.

關於 displaypolicyd 磁碟權限問題,已知造成螢幕無法喚醒、閃爍或其他顯示問題。

已知解決辦法:

  • 修復磁碟權限(重開機後似乎又回到原始狀態)
  • 手動修復權限

於終端機(terminal)輸入
sudo chown -R root /private/var/db/displaypolicyd && sudo chgrp -R wheel /private/var/db/displaypolicyd
或是
sudo diskutil repairPermissions /

國外網友詳細解法

1 - Create a shell script example: fixesPermissions.sh
sudo chown -R root /private/var/db/displaypolicyd && sudo chgrp -R wheel /private/var/db/displaypolicyd

2 - Path in my case
/etc

3 - Allow my user to run the script without root password
sudo nano /etc/sudoers

below the line
# Samples
# %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users  localhost=/sbin/shutdown -h now

add line
myuser  ALL=NOPASSWD: /etc/fixesPermissions.sh

key cmd + x
key y
key cmd + m

4 - Run the shell script when my user logs
sudo defaults write com.apple.loginwindow LoginHook /etc/fixesPermissions.sh








0 意見:

張貼留言