Acl

Extended Attributes

rm しようとしたらパーミションがないと怒られるファイルやディレクトリがあった。 $ ls -l drwx------+ 2 jun _lpoperator 68 4 22 18:14 Desktop/ -rw-r--r--@ 1 jun _lpoperator 331778 2 16 2010 slide.key 末尾の +やら@やらは何だろうとman lsで調べたらこう書いてあった。 If the file or directory has extended attributes, the permissions field printed by the -l option is followed by a ‘@’ character. Otherwise, if the file or directory has extended security information (such …

public_htmlのパーミション

~/public_html以下に,apache(実行ユーザ名apache)に書き込みを許すときにはsetfaclでパーミション設定をする。 $ setfacl -R -m apache:rwx /home/username/public_html $ setfacl -R -d -m apache:rwx /home/username/public_html $ setfacl -R -m username:rwx /home/username/public_html $ setfacl -R -d -m username:rwx /home/username/public_html chmod o+xなどで対処する方法もあるが,setfaclのほうがeasy and secure!