- httpd.conf
#httpd-dav.conf --->
httpd-dav.conf
cd /etc/apache2/extra
vim http-dav.conf
Digest--->Basic
AuthDigestProvider file --->
#AuthDigestProvider file
- 關(guān)閉SIP
macOS EI Capitan(11) 默認(rèn)開啟了 SIP(即System Integrity Protection
糊闽,系統(tǒng)完整性保護功能)狸剃,即使是使用了 root 權(quán)限也無法在 /usr 目錄下創(chuàng)建新文件综慎。 - 關(guān)閉 SIP 的步驟:
重啟 Mac霉颠,按住 Command + R弟头,進入 recovery 模式;
選擇打開 Utilities下的終端;
輸入 csrutil disable 并回車; //enable開啟
最后重啟 Mac 即可易桃。
2020/06/12最新問題 mac10.15.5
關(guān)閉SIP依然沒有以下目錄的寫權(quán)限
/System
/bin
/dev
/home
/ sbin
/usr
解決:
- 掛載根目錄
mount -uw /
killall Finder
cd /usr
//下面三個文件夾是根據(jù)httpd-dav.conf中對應(yīng)名稱創(chuàng)建的亥鸠,名稱需對應(yīng):
sudo htpasswd -c user.passwd admin
New password:
Re-Type new password:
Adding password for user admin
sudo chgrp www user.passwd
sudo mkdir -p /usr/var
sudo mkdir -p /usr/uploads
sudo chown -R www:www /usr/var
sudo chown -R www:www /usr/uploads