From owner-freebsd-fs@FreeBSD.ORG Mon Aug 19 18:12:16 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 87C2E741 for ; Mon, 19 Aug 2013 18:12:16 +0000 (UTC) (envelope-from andrey.russev@gmail.com) Received: from mail-ea0-x232.google.com (mail-ea0-x232.google.com [IPv6:2a00:1450:4013:c01::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1D7BD2F7D for ; Mon, 19 Aug 2013 18:12:15 +0000 (UTC) Received: by mail-ea0-f178.google.com with SMTP id a15so2462821eae.37 for ; Mon, 19 Aug 2013 11:12:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=MqC6O0kqLq6JxGNBdC/Su/Gc94UIRaT9PZ33sNnstvI=; b=f9dPtw+URg9mCY9O0o3O+1WCHjffLoFY54A7sy8Q3JJHdF96KGOkf7HMWc42jzHoq5 bXm38axgfd8UmW/I/sd6HAVAIK0SkIClMefgnr8MUIbIuZ+EopTTMv3IMgABsr8h/bBN tCzeQvL2JfKjOCh861T4pHeBGYyjBc42rW5HLf+O7UvL4QFoiS6tYX+ZMHqCq2jY/lai 2i9YXMn4A36jvcSuWR5R/9xAEnBNnnJHRf1iPX7tejNM22qVcMEpd67ftcfvZAtULAaJ GrwNxIa+o+HbOLAMdUU9Qij1Wd+Eear6G37uR7wOVi64CMdZv2XbceS8g7TuMtigm8Kt Pz3w== X-Received: by 10.15.98.129 with SMTP id bj1mr66224eeb.75.1376935934391; Mon, 19 Aug 2013 11:12:14 -0700 (PDT) Received: from [46.203.17.152] (152-17-203-46.pool.ukrtel.net. [46.203.17.152]) by mx.google.com with ESMTPSA id h52sm19035973eez.3.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 19 Aug 2013 11:12:13 -0700 (PDT) Message-ID: <52125FF9.4080005@gmail.com> Date: Mon, 19 Aug 2013 21:12:09 +0300 From: Andrey Russev User-Agent: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: freebsd-fs@freebsd.org Subject: ZFS ACL inheritance with aclmode=passthrough Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Aug 2013 18:12:16 -0000 Hello, it looks like ZFS ACL inheritance implementation in 8.4-RELEASE does not match the manual page. In case aclinherit=restricted and aclmode=passthrough all permissions inherited from allow ACEs are masked(?) by group permissions. For example, ACEs of parent directory are group:wheel:rwxp----------:-d----:allow owner@:rwxp--aARWcCos:------:allow group@:r-x---a-R-c--s:------:allow everyone@:r-x---a-R-c--s:------:allow but ACEs of child directory are group:wheel:r-x-----------:-d----:allow owner@:rwxp--aARWcCos:------:allow group@:r-x---a-R-c--s:------:allow everyone@:r-x---a-R-c--s:------:allow I think that first entry must be copied without modification. It works this way in 8.1-RELEASE. I believe that this difference was introduced by r224174 in lines: 1732 zfs_acl_chmod(vap->va_type, acl_ids->z_mode, 1733 (zfsvfs->z_acl_inherit == ZFS_ACL_RESTRICTED), 1734 acl_ids->z_aclp); because function zfs_acl_chmod applies group mask to all allow ACEs if third argument is non zero and everything works as expected when aclinherit=passthrough. Am I right? Thanks, Andrey.