Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Aug 2019 22:10:55 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 240157] cp has no ability to preserve extended attributes when copying a file
Message-ID:  <bug-240157-227@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 240157
           Summary: cp has no ability to preserve extended attributes when
                    copying a file
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: sean@rogue-research.com

I was very surprised to see that neither 'cp -p' nor 'cp -a' preserve the
extended attributes of a file.

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


EAs sometimes contain important data, and there should surely be some kind =
of
option to preserve them when copying a file.

In contrast, macOS's cp -p does preserve EAs.

See also #240146 for related bug against the cp man page for saying nothing.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



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