フォルダ内に作成されたもの(ディレクトリ、ファイル)がデフォルトの権限とグループを継承するようにフォルダを設定したい。
グループを「メディア」と呼びましょう。また、ディレクトリ内に作成されたフォルダ/ファイルには、自動的にg+rwが含まれている必要があります。
承認された回答:
私はそれを見つけました:デフォルトの権限を適用する
記事から:
-
setgid
を設定します ビット、<ディレクトリ>の下のファイル/フォルダが<ディレクトリ>chmod g+s <directory>
-
グループおよびその他のデフォルトACLを設定します
setfacl -d -m g::rwx /<directory> setfacl -d -m o::rx /<directory>
次に確認できます:
getfacl /<directory>
出力:
# file: ../<directory>/
# owner: <user>
# group: media
# flags: -s-
user::rwx
group::rwx
other::r-x
default:user::rwx
default:group::rwx
default:other::r-x