В чем разница между aclinherit и aclmode?

Файловые системы ZFS могут иметь свойства aclinherit и aclmode , установленные для управления тем, как наследуемые записи ACL взаимодействуют с созданием объектов и операциями разрешений в стиле Unix.

К сожалению, официальная документация немного загадочна / двусмысленна относительно того, в чем именно разница между этими двумя свойствами с точки зрения их роли в вычислении ACL. Для иллюстрации возьмите эти отрывки из Защита файлов и проверка целостности файлов. (Я знаком с API Windows, но не с * nix.)

Мне кажется, что даже после прочтения документации у меня есть довольно неполное представление о том, как работают эти свойства.

В чем именно разница между ними. ? Кажется, что они частично пересекаются, так что же определяет, что применяется? Что, если они противоречат друг другу?

5
задан 28 June 2017 в 23:54
1 ответ

Из руководства openzfs https://github.com/openzfs/openzfs.git

Клонировать репозиторий и man openzfs / usr / src / man / man1m / zfs. 1m

 aclinherit=discard|noallow|restricted|passthrough|passthrough-x
   Controls how ACEs are inherited when files and directories are created.

   discard        does not inherit any ACEs.
   noallow        only inherits inheritable ACEs that specify "deny" permissions.
   restricted     default, removes the write_acl and write_owner permissions 
                  when the ACE is inherited.
   passthrough    inherits all inheritable ACEs without any modifications.
   passthrough-x  same meaning as passthrough, except that the owner@, group@, and 
                  everyone@ ACEs inherit the execute permission only if the file 
                  creation mode also requests the execute bit.

   When the property value is set to passthrough, files are created with a mode 
   determined by the inheritable ACEs.  If no inheritable ACEs exist that affect 
   the mode, then the mode is set in accordance to the requested mode from the 
   application.


 aclmode=discard|groupmask|passthrough|restricted
   Controls how an ACL is modified during chmod(2) and how inherited ACEs are 
   modified by the file creation mode.

   discard      default, deletes all ACEs except for those representing the mode 
                of the file or directory requested by chmod(2).
   groupmask    reduces permissions granted by all ALLOW entries found in the ACL 
                such that they are no greater than the group permissions specified 
                by the mode.
   passthrough  indicates that no changes are made to the ACL other than creating 
                or updating the necessary ACEs to represent the new mode of the 
                file or directory.
   restricted   causes the chmod(2) operation to return an error when used on any 
                file or directory which has a non-trivial ACL, with entries in 
                addition to those that represent the mode.

   chmod(2) is required to change the set user ID, set group ID, or sticky bit on 
   a file or directory, as they do not have equivalent ACEs.  In order to use 
   chmod(2) on a file or directory with a non-trivial ACL when aclmode is set to 
   restricted, you must first remove all ACEs except for those that represent the 
   current mode.
0
ответ дан 3 December 2019 в 02:09

Теги

Похожие вопросы