From owner-freebsd-bugs@freebsd.org Sat Apr 1 18:43:52 2017 Return-Path: Delivered-To: freebsd-bugs@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 37950D29727 for ; Sat, 1 Apr 2017 18:43:52 +0000 (UTC) (envelope-from lew@perftech.com) Received: from smtp-gw.pt.net (smtp-gw.pt.net [206.210.194.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp-gw.pt.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F2956F8F for ; Sat, 1 Apr 2017 18:43:51 +0000 (UTC) (envelope-from lew@perftech.com) X-ASG-Debug-ID: 1491072109-09411a12f8219f8a0001-Wc1sAr Received: from mail.pt.net (mail.pt.net [206.210.194.11]) by smtp-gw.pt.net with ESMTP id 1lBxxEHNy0FsLaap (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 01 Apr 2017 13:41:49 -0500 (CDT) X-Barracuda-Envelope-From: lew@perftech.com X-Barracuda-Effective-Source-IP: mail.pt.net[206.210.194.11] X-Barracuda-Apparent-Source-IP: 206.210.194.11 Received: from localhost (localhost [IPv6:::1]) by mail.pt.net (Postfix) with ESMTP id DB97B842602; Sat, 1 Apr 2017 13:41:49 -0500 (CDT) Received: from mail.pt.net ([IPv6:::1]) by localhost (mail.pt.net [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id QFxiKQ25QyfS; Sat, 1 Apr 2017 13:41:49 -0500 (CDT) Received: from localhost (localhost [IPv6:::1]) by mail.pt.net (Postfix) with ESMTP id 28909842610; Sat, 1 Apr 2017 13:41:49 -0500 (CDT) X-Virus-Scanned: amavisd-new at pt.net Received: from mail.pt.net ([IPv6:::1]) by localhost (mail.pt.net [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id KpPo19HNxmVO; Sat, 1 Apr 2017 13:41:49 -0500 (CDT) Received: from lewhome-dhcp-179.pt.net (lewhome-dhcp-179.pt.net [206.210.207.179]) (Authenticated sender: lew@pt.net) by mail.pt.net (Postfix) with ESMTPSA id BE9D0842602; Sat, 1 Apr 2017 13:41:48 -0500 (CDT) From: Lewis Donzis Message-Id: Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: Fix cp not to give chflags error on NFS Date: Sat, 1 Apr 2017 13:41:47 -0500 X-ASG-Orig-Subj: Re: Fix cp not to give chflags error on NFS In-Reply-To: <20170402032137.J13168@besplex.bde.org> Cc: Eitan Adler , FreeBSD Standards , freebsd-bugs@freebsd.org To: Bruce Evans References: <8FDBAA2C-93B8-49FA-B3CD-5B709A93A5C4@perftech.com> <20170402032137.J13168@besplex.bde.org> X-Mailer: Apple Mail (2.3259) X-Barracuda-Connect: mail.pt.net[206.210.194.11] X-Barracuda-Start-Time: 1491072109 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://smtp-gw.pt.net:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 7617 X-Virus-Scanned: by bsmtpd at pt.net X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests=HTML_MESSAGE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.37721 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 HTML_MESSAGE BODY: HTML included in message Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Apr 2017 18:43:52 -0000 > On Apr 1, 2017, at 1:16 PM, Bruce Evans wrote: Thanks for the detailed explanation. As I mentioned later, the problem seems to be more lated to the NFSv4 = server running Linux (FWIW, the underlying filesystem on our Linux NFS = server is ZFS). > nfs should support file flags iff the server does. Unfortunately, = there > is no protocol to set them (at least in nfs3). We switched to NFSv4 in the hopes that it would solve this. And, in = fact, it does if the server is running FreeBSD. But on Linux, not only does the ACL (which we never set) appear to cp = not to be =E2=80=9Ctrivial=E2=80=9D, but it fails to set. I=E2=80=99ve = added some details below, if it=E2=80=99s of any interest. We were already in the process of switching our NFS servers from Linux = to FreeBSD anyway, so this will just accelerate the process. Thanks, lew Using a Linux NFSv4 server: root@fbdev:/shared/lew # mount ******:/shared on /shared (nfs, nfsv4acls) root@fbdev:/shared/lew # cp -p xx yy nfsv4 err=3D10032 cp: failed to set acl entries for yy: Operation not permitted root@fbdev:/shared/lew # ls -l xx yy -rwxrwxr-x+ 1 root wheel 4821 Apr 25 2009 xx -rwxrwxr-x+ 1 root wheel 4821 Apr 25 2009 yy root@fbdev:/shared/lew # getfacl -v xx # file: xx # owner: root # group: wheel = owner@:read_data/write_data/execute/append_data/read_attributes/write_attr= ibutes/read_acl/write_acl/synchronize::allow = group@:read_data/write_data/execute/append_data/read_attributes/read_acl/s= ynchronize::allow = everyone@:read_data/execute/read_attributes/read_acl/synchronize::allow Using a FreeBSD NFSv4 server: root@fbdev:/mnt/lew # mount ******:/shared on /mnt (nfs, nfsv4acls) root@fbdev:/mnt/lew # cp -p xx yy root@fbdev:/mnt/lew # ls -l xx yy -rwxrwxr-x 1 root wheel 4821 Apr 25 2009 xx -rwxrwxr-x 1 root wheel 4821 Apr 25 2009 yy root@fbdev:/mnt/lew # getfacl -v xx # file: xx # owner: root # group: wheel = owner@:read_data/write_data/execute/append_data/read_attributes/write_attr= ibutes/read_xattr/write_xattr/read_acl/write_acl/write_owner/synchronize::= allow = group@:read_data/write_data/execute/append_data/read_attributes/read_xattr= /read_acl/synchronize::allow = everyone@:read_data/execute/read_attributes/read_xattr/read_acl/synchroniz= e::allow