Skip to content

Instantly share code, notes, and snippets.

@t-nissie
Created July 7, 2022 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save t-nissie/6aab19338862c3381224bcfa3af328c3 to your computer and use it in GitHub Desktop.
Save t-nissie/6aab19338862c3381224bcfa3af328c3 to your computer and use it in GitHub Desktop.

umask 002 と UPG と 共有ディレクトリで共有gitレポジトリ

書きかけ

概要

各ユーザごとのUser private group (UPG) がプライマリユーザグループになっていればumask 002でかまわない。 umask 022とかumask 077にしがちな古参UNIXユーザは改心が必要。

デフォルト

/etc/profile、/etc/bashrc でumaskの値がどのように設定されているか

if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then
    umask 002
else
    umask 022
fi

共有ディレクトリで共有gitレポジトリ

そもそもgit init--share=groupオプションを付けておけば大丈夫?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment