多使用者共用檔案
新檔案拿不到 group write
open(path, O_CREAT, 0664) 實際權限是 mode & ~umask,預設 umask 022 會關掉 group write。
解法:
Default ACL(推薦):對資料夾設定,之後新建的檔案都會繼承
bashsetfacl -d -m g:myteam:rwx <dir> getfacl <dir>umask(002):process 層級,不是 thread-safe,暫時改再改回去會有 race建立後再
chmod:中間有時間差
Git:unsafe repository
Git 2.35.2 起(CVE-2022-24765),repo owner 不是目前使用者時,連 git log 都會拒絕:
fatal: unsafe repository ('/path/to/repo' is owned by someone else)信任該路徑:
bash
git config --global --add safe.directory /path/to/repo沒有 group 層級的設定。