Actions
Bug #6764
closedzfs issues with inheritance flags during chmod(2) with aclmode=passthrough
Start date:
2016-03-19
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:
Description
(by Marcel Telka)
The zfs(1m) man page says this about aclmode=passthrough:
A file system with an
aclmode property of passthrough indicates that no
changes are made to the ACL other than creating or
updating the necessary ACL entries to represent the new
mode of the file or directory.
As we could see in the following example the inheritance flag (f) is cleared by chmod(2):
# zfs get aclmode rpool/export/test
NAME PROPERTY VALUE SOURCE
rpool/export/test aclmode passthrough local
# pwd
/export/test
# mkdir dir
# /usr/bin/ls -lVd dir
drwxr-xr-x 2 root root 2 okt 9 19:09 dir
owner@:rwxp--aARWcCos:-------:allow
group@:r-x---a-R-c--s:-------:allow
everyone@:r-x---a-R-c--s:-------:allow
# /usr/bin/chmod A0=owner@:rwxp--aARWcCos:f:allow dir
# /usr/bin/ls -lVd dir
drwxr-xr-x+ 2 root root 2 okt 9 19:09 dir
owner@:rwxp--aARWcCos:f------:allow
group@:r-x---a-R-c--s:-------:allow
everyone@:r-x---a-R-c--s:-------:allow
# /usr/bin/chmod 755 dir
# /usr/bin/ls -lVd dir
drwxr-xr-x 2 root root 2 okt 9 19:09 dir
owner@:rwxp--aARWcCos:-------:allow
group@:r-x---a-R-c--s:-------:allow
everyone@:r-x---a-R-c--s:-------:allow
#
When I set more inheritance flags (fdi) they are not cleared by chmod(2), but one more ACE is added:
# rm -rf dir
# mkdir dir
# /usr/bin/chmod A0=owner@:rwxp--aARWcCos:fdi:allow dir
# /usr/bin/ls -lVd dir
dr-xr-xr-x+ 2 root root 2 okt 9 19:29 dir
owner@:rwxp--aARWcCos:fdi----:allow
group@:r-x---a-R-c--s:-------:allow
everyone@:r-x---a-R-c--s:-------:allow
# /usr/bin/chmod 755 dir
# /usr/bin/ls -lVd dir
drwxr-xr-x+ 2 root root 2 okt 9 19:29 dir
owner@:rwxp--aARWcCos:fdi----:allow
owner@:rwxp--aARWcCos:-------:allow
group@:r-x---a-R-c--s:-------:allow
everyone@:r-x---a-R-c--s:-------:allow
#
It seems both testcases shows bugs. The 'ls -lVd' output before and after the 'chmod 755' should be same, I think.
Expected Results:
The inheritance flags should be unchanged by the chmod(2) operation.
Actual Results:
The inheritance flags are either cleared, or one more new ACE is created.
Related issues
Updated by Yuri Pankov about 8 years ago
- Precedes Bug #6875: fix zfs-tests ACL cases added
Updated by Electric Monk about 8 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit de0f1ddb598506a5d9a02946b67e9300b5f2a7cd
commit de0f1ddb598506a5d9a02946b67e9300b5f2a7cd
Author: Albert Lee <trisk@nexenta.com>
Date: 2016-04-20T15:33:58.000Z
6764 zfs issues with inheritance flags during chmod(2) with aclmode=passthrough
Reviewed by: Gordon Ross <gwr@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Actions