coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cp: when are ACLs copied?


From: Bernhard Voelker
Subject: cp: when are ACLs copied?
Date: Fri, 23 Nov 2012 10:02:08 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121025 Thunderbird/16.0.2

As far as I understand the texi documentation, "cp -p" and "cp --preserve"
copy the ACLs (because they belong to the 'mode' which is included in the
default 'mode,owner,timestamps'):

  ‘mode’
  Preserve the file mode bits and access control lists.

But reading further, this becomes unclear again:

  ‘xattr’
  Preserve extended attributes of the file, or fail with full diagnostics.
  If cp is built without xattr support, ignore this option. If SELinux context,
  ACLs or Capabilities are implemented using xattrs, they are preserved by this
  option as well.

Does that mean, that ACLs are not copied with "cp -p" on SELinux systems,
and that you'd need either "cp --pres=owner,mode,timestamps,xattr" or
"cp --pres=all" on such systems? Doesn't sound much consistent ...

And finally, what does the condition "If SELinux context" mean exactly?
a) if SELinux support is compiled into cp, or
b) if the system has SELinux enabled?

Have a nice day,
Berny



reply via email to

[Prev in Thread] Current Thread [Next in Thread]