ACL (Access Control List) 一部拙訳

Symfony の設定にあたり、ACL を設定する必要がありました。
そのときに参考にしたページの一部拙訳です。

(原文) https://help.ubuntu.com/community/FilePermissions#ACL_.28Access_Control_List.29

ACLの説明はこちらも参考にしました。
特集:Linuxカーネル2.6で実現するACL (1/5)
http://www.itmedia.co.jp/enterprise/0403/06/epn01.html

ACL (Access Control List)

Posix ACLs are a way of achieving a finer granularity of permissions than is possible with the standard Unix file permissions. See the full page on ACLs FilePermissionsACLs

Posix ACL は、標準的な Unix ファイルパーミッションで導入でき、丁度いい設定の細かさでパーミッション指定を実現する方法です。
ACLについての完全なページも参照して下さい。

Setting up ACL / ACLを設定

1. Install the acl package:
1. acl packageをインストールします。

sudo apt-get install acl

2. Edit /etc/fstab and add option acl to partition(s) on which you want to enable ACL. For example:
2. /etc/fstab を編集し、ACLを有効にしたいパーティションへオプションを追加します。例えば:

...
UUID=d027a8eb-e234-1c9f-aef1-43a7dd9a2345 /home    ext4   defaults,acl   0   2
...

3. Remount partition(s) on which you want to enable ACL. For example:
3. ACLを有効にしたいパーティションを再マウントします。例えば;

sudo mount -o remount /home

4. Verify acl is enabled on the partition(s):
4. パーティションのACLが有効か確認します:

mount | grep acl

The commands, setfacl and getfacl, set and read ACLs on files and directories.
setfacl と getfacl コマンドはそれぞれ、ファイルやディレクトリにACLを指定したり確認したりします。

Example Usage / 使用例

This is a simple example for use with a Samba share to ensure that any files or sub-directories created could also be modified by any Samba user.
これはユーザが Samba 共有 で、作成されたどんなファイルやサブディレクトリも Samba ユーザによって変更できることを確実にする簡単な実例です。

1. Create a directory with full permission:
1. 全パーミッション付きで、ディレクトリを作る:

mkdir shared_dir
chmod 777 shared_dir

2. Set the default ACL with '-d' and modify with '-m' the permissions for samba nobody user nogroup group which will apply to all newly created file/directories.
2. samba nobody user nogroup group が、全ての新しく作成されるファイル/ディレクトリに適用されるであろう、規定の ACLを'-d' で、変更を'-m'でパーミッションに指定します。

setfacl -d -m u:nobody:rwx,g:nogroup:rwx,o::r-x shared_dir