Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PosixACL: lost default rules after reboot #4520

Closed
ppppggg opened this issue Apr 13, 2016 · 5 comments
Closed

PosixACL: lost default rules after reboot #4520

ppppggg opened this issue Apr 13, 2016 · 5 comments
Milestone

Comments

@ppppggg
Copy link

ppppggg commented Apr 13, 2016

I'm using latest stable ZoL on CentOS 7 (up to date).

The problem is that POSIX ACLs which I set using setfacl are lost after reboots.

[root@localhost ~]# rpm -qa | grep ^kernel
kernel-3.10.0-327.13.1.el7.x86_64
kernel-headers-3.10.0-327.13.1.el7.x86_64
kernel-devel-3.10.0-327.13.1.el7.x86_64
kernel-tools-3.10.0-327.13.1.el7.x86_64
kernel-3.10.0-327.el7.x86_64
kernel-tools-libs-3.10.0-327.13.1.el7.x86_64

[root@localhost ~]# dmesg | grep -E 'SPL:|ZFS:'
[    6.210253] SPL: Loaded module v0.6.5.6-1
[    6.763326] ZFS: Loaded module v0.6.5.6-1, ZFS pool version 5000, ZFS filesystem version 5
[   11.014731] SPL: using hostid 0x00000000

zpool details:

[root@localhost ~]# zpool history
History for 'data':
2016-04-13.14:12:42 zpool create -f -m /mnt/data data /root/disk1
2016-04-13.14:15:08 zfs set acltype=posixacl data
2016-04-13.14:15:20 zfs set aclinherit=passthrough data
2016-04-13.14:15:43 zfs set compression=lz4 data
2016-04-13.14:15:58 zfs set atime=off data
2016-04-13.14:16:05 zfs set relatime=off data

Steps to reproduce:

[root@localhost ~]# cd /mnt/data/
[root@localhost data]# mkdir test_dir
[root@localhost data]# setfacl -R --mask -m u:uadm:rwX test_dir/
[root@localhost data]# setfacl -R -d --mask -m u:uadm:rwX test_dir/
[root@localhost data]# getfacl test_dir/
# file: test_dir/
# owner: root
# group: root
user::rwx
user:uadm:rwx
group::r-x
mask::rwx
other::r-x
default:user::rwx
default:user:uadm:rwx
default:group::r-x
default:mask::rwx
default:other::r-x

[root@localhost data]# reboot

After reboot I login into test system again and get this ACLs:

[root@localhost ~]# cd /mnt/data/
[root@localhost data]# getfacl test_dir/
# file: test_dir/
# owner: root
# group: root
user::rwx
user:uadm:rwx
group::r-x
mask::rwx
other::r-x

No anymore default rules after reboot.

@ppppggg
Copy link
Author

ppppggg commented Apr 13, 2016

zfs umount -a
zfs mount -a

is enought to reproduce the reported problem.

@ppppggg
Copy link
Author

ppppggg commented Apr 15, 2016

The problem didn't reproduced on versions below:

[    5.892572] SPL: Loaded module v0.6.3-1.3
[    6.229796] ZFS: Loaded module v0.6.3-1.3, ZFS pool version 5000, ZFS filesystem version 5
[    8.531342] SPL: using hostid 0x00000000

@ppppggg
Copy link
Author

ppppggg commented Apr 15, 2016

Problem was introduced between this two versions:

[    0.895993] SPL: Loaded module v0.6.5.4-1
[    0.948350] ZFS: Loaded module v0.6.5.4-1, ZFS pool version 5000, ZFS filesystem version 5

and

[    0.895052] SPL: Loaded module v0.6.5.5-1
[    0.943625] ZFS: Loaded module v0.6.5.5-1, ZFS pool version 5000, ZFS filesystem version 5

I've updated ZFS step-by-step from 0.6.3 to 0.6.5.5 to find this.

@nedbass
Copy link
Contributor

nedbass commented Apr 15, 2016

@ppppggg thanks for bisecting to the release that introduced the bug. I'll look into it.

nedbass added a commit to nedbass/zfs that referenced this issue Apr 15, 2016
Commit 4967a3e introduced a typo that caused the ZPL to store the
intended default ACL as an access ACL. Due to caching this problem
may not become visible until the filesystem is remounted or the inode
is evicted from the cache. Fix the typo and add a regression test.

Fixes openzfs#4520

Signed-off-by: Ned Bass <[email protected]>
nedbass added a commit to nedbass/zfs that referenced this issue Apr 15, 2016
Commit 4967a3e introduced a typo that caused the ZPL to store the
intended default ACL as an access ACL. Due to caching this problem
may not become visible until the filesystem is remounted or the inode
is evicted from the cache. Fix the typo and add a regression test.

Fixes openzfs#4520

Signed-off-by: Ned Bass <[email protected]>
nedbass added a commit to nedbass/zfs that referenced this issue Apr 16, 2016
Commit 4967a3e introduced a typo that caused the ZPL to store the
intended default ACL as an access ACL. Due to caching this problem
may not become visible until the filesystem is remounted or the inode
is evicted from the cache. Fix the typo and add a regression test.

Fixes openzfs#4520

Signed-off-by: Ned Bass <[email protected]>
@behlendorf behlendorf added this to the 0.6.5.7 milestone Apr 18, 2016
@behlendorf
Copy link
Contributor

@ppppggg thanks for so clearly reporting this issue. @nedbass identified the root cause and has a fix which has been merged to master. We'll get this fix in to the next point release but you can cherry-pick it now if you need it.

98f0369 Fix ZPL miswrite of default POSIX ACL

nedbass added a commit to nedbass/zfs that referenced this issue May 6, 2016
Commit 4967a3e introduced a typo that caused the ZPL to store the
intended default ACL as an access ACL. Due to caching this problem
may not become visible until the filesystem is remounted or the inode
is evicted from the cache. Fix the typo.

Signed-off-by: Ned Bass <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Signed-off-by: Chunwei Chen <[email protected]>
Closes openzfs#4520
ryao pushed a commit to ClusterHQ/zfs that referenced this issue Jun 7, 2016
Commit 4967a3e introduced a typo that caused the ZPL to store the
intended default ACL as an access ACL. Due to caching this problem
may not become visible until the filesystem is remounted or the inode
is evicted from the cache. Fix the typo and add a regression test.

Signed-off-by: Ned Bass <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Signed-off-by: Chunwei Chen <[email protected]>
Closes openzfs#4520
nedbass added a commit to nedbass/zfs that referenced this issue Sep 3, 2016
Commit 4967a3e introduced a typo that caused the ZPL to store the
intended default ACL as an access ACL. Due to caching this problem
may not become visible until the filesystem is remounted or the inode
is evicted from the cache. Fix the typo and add a regression test.

Signed-off-by: Ned Bass <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Signed-off-by: Chunwei Chen <[email protected]>
Closes openzfs#4520
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants