Это старая версия документа!
Управление списками доступа POSIX ACL (Access Control Lists).
Использование в Samba
Графический интерфейс: Eiciel
apt-get install acl
Для того, чтобы проверить поддерживаются ли списки доступа (ACL) нужно выполнить команду:
tune2fs -l /dev/sdaX |grep acl
/dev/sdaX
имя устройства.
Если ACL поддерживаются то в выводе команды будет примерно это:
Default mount options: user_xattr acl
Установка прав доступа
Usage: setfacl [-bkndRLP] { -m|-M|-x|-X ... } file ... -m, --modify=acl modify the current ACL(s) of file(s) -M, --modify-file=file read ACL entries to modify from file -x, --remove=acl remove entries from the ACL(s) of file(s) -X, --remove-file=file read ACL entries to remove from file -b, --remove-all remove all extended ACL entries -k, --remove-default remove the default ACL --set=acl set the ACL of file(s), replacing the current ACL --set-file=file read ACL entries to set from file --mask do recalculate the effective rights mask -n, --no-mask don't recalculate the effective rights mask -d, --default operations apply to the default ACL -R, --recursive recurse into subdirectories -L, --logical logical walk, follow symbolic links -P, --physical physical walk, do not follow symbolic links --restore=file restore ACLs (inverse of `getfacl -R') --test test mode (ACLs are not modified) -v, --version print version and exit -h, --help this help text
Пример:
setfacl -R -b -m g:Group_F:rwx,g:Group_R:rx,default:g:Group_F:rwx,default:g:Group_R:rx,default:other:--- /srv/share01
Рекурсивно -R
удаляем существующие права -b
и добавляем заданные права, устанавливаем умолчания.
Group_F
полные праваGroup_R
только чтениеother
= нет доступа