From owner-freebsd-stable@freebsd.org Sat Mar 4 15:13:37 2017 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B71F3CF20DF for ; Sat, 4 Mar 2017 15:13:37 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id A6C6E142A for ; Sat, 4 Mar 2017 15:13:37 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: by mailman.ysv.freebsd.org (Postfix) id A3366CF20DE; Sat, 4 Mar 2017 15:13:37 +0000 (UTC) Delivered-To: stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A04AACF20DD for ; Sat, 4 Mar 2017 15:13:37 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from home.opsec.eu (home.opsec.eu [IPv6:2001:14f8:200::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CE4A1423; Sat, 4 Mar 2017 15:13:37 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from pi by home.opsec.eu with local (Exim 4.87 (FreeBSD)) (envelope-from ) id 1ckBNK-0008yt-3E; Sat, 04 Mar 2017 16:13:38 +0100 Date: Sat, 4 Mar 2017 16:13:38 +0100 From: Kurt Jaeger To: Edward Tomasz Napiera??a Cc: Kurt Jaeger , stable@freebsd.org Subject: Re: How to copy ACLs on ZFS with tar ? Message-ID: <20170304151338.GH13006@home.opsec.eu> References: <20170304115033.GF13006@home.opsec.eu> <7E014FF3-6D2D-4397-B81A-07B87DA904F3@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7E014FF3-6D2D-4397-B81A-07B87DA904F3@FreeBSD.org> X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Mar 2017 15:13:37 -0000 Hi! > > I have a file with the following ACL (in fact, a whole tree with files > > like that): > > > > srv$ getfacl myfile > > # file: myfile > > # owner: myuser > > # group: domain-users > > group:myuser:rw-p--aARWcCo-:-------:allow > > group@:rw-p--a-R-c---:-------:allow > > everyone@:rw-p--a-R-c---:-------:allow > > > > How do I copy this file or the tree with tar, while preserving the ACLs ? > > Or do I have to use something else ? > > Not sure about tar, but plain "cp -p" should do the trick. This worked fine. Thanks! Shouldn't tar work, too ? According to this commit to libarchive: https://github.com/libarchive/libarchive/commit/59e3c3919b66cc1f1a59a9c32307befe015f40e8 it will be supported soon. -- pi@opsec.eu +49 171 3101372 3 years to go !