Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Aug 2019 14:15:48 +0000
From:      bugzilla-noreply@freebsd.org
To:        doc@FreeBSD.org
Subject:   [Bug 240146] 'man cp' does not discuss extended attributes; it really should since even -p discards them!
Message-ID:  <bug-240146-9@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D240146

            Bug ID: 240146
           Summary: 'man cp' does not discuss extended attributes; it
                    really should since even -p discards them!
           Product: Documentation
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Manual Pages
          Assignee: bugs@FreeBSD.org
          Reporter: sean@rogue-research.com
                CC: doc@FreeBSD.org

The man page for 'cp' does not contain the word "extended" nor "attribute".

I was very surprised to see that even 'cp -p' apparently does not preserve =
the
extended attributes of a file.

I'd argue 'cp -p' behaviour is wrong, but at the very least it should be
documented.

By contrast, the macOS 10.13 man page says: "-p    Cause cp to preserve the
following attributes of each source file in the copy: modification time, ac=
cess
time, file flags, file mode, user ID, and group ID, as allowed by permissio=
ns.=20
Access Control Lists (ACLs) and Extended Attributes (EAs), including resour=
ce
forks, will also be preserved."

A simple sentence to warn that cp -p will blow away EAs would help.  We're
talking about data loss here. :(

example:

root@freenas[/test]# lsextattr user A.txt=20
A.txt   DosStream.com.apple.TextEncoding:$DATA  DosStream.AFP_Resource:$DAT=
A=20=20=20
DosStream.AFP_AfpInfo:$DATA     DOSATTRIB=20=20=20=20=20=20
DosStream.com.apple.lastuseddate#PS:$DATA


root@freenas[/test]# cp -a A.txt A2.txt=20=20=20=20=20=20


root@freenas[/test]# lsextattr user A2.txt
A2.txt

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-240146-9>