Инструменты пользователя

Инструменты сайта


posix_acl:posix_acl

Это старая версия документа!


Списки доступа (POSIX ACL)

Управление списками доступа POSIX ACL (Access Control Lists).

Access Control Lists in Linux

Использование в Samba

Графический интерфейс: Eiciel

Установка

apt-get install acl

Проверка поддержки

Для того, чтобы проверить поддерживаются ли списки доступа (ACL) нужно выполнить команду:

tune2fs -l /dev/sdaX |grep acl

/dev/sdaX имя устройства.

Если ACL поддерживаются то в выводе команды будет примерно это:

Default mount options:    user_xattr acl

setfacl

Установка прав доступа

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 -r -m g:Group_F:rwx,g:Group_R:rx,default:g:Group_F:rwx,default:g:Group_R:rx,default:other:--- /srv/share01

Рекурсивно -R удаляем существующие права -r и добавляем заданные права, устанавливаем умолчания.

  • Group_F полные права
  • Group_R только чтение
  • other = нет доступа

getfacl

FIXME

Ссылки

posix_acl/posix_acl.1529575787.txt.gz · Последние изменения: 2018-06-21 13:09 — GreyWolf