Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)
cp(1) OSS Shell and Utilities Reference Manual
the destination file, permissions allowing.
If the destination does not exist and the source is a file, the destination is considered a file, and
the source is copied to it.
If the source and destination are either both directories or both files and they have the same
name, an error occurs and the copy fails.
Use With Access Control Lists (ACLs)
If the file being copied has an ACL, typically the new file created by the cp command retains the
ACL. However, if the cp command is executed remotely from a system that does not support
OSS ACLs, then the ACL for the file is not copied to the destination file. If destination fileset
supports OSS ACLs, the destination file might inherit ACL entries from the parent directory of
the destination file. If the destination fileset does not support OSS ACLs, the destination files do
not have ACLs. For more information about ACLs, see the acl(5) reference page.
For G-series RVUs, H06.19 and earlier H-series RVUs, or J06.08 and earlier J-series RVUs, the
OSS Network File System (NFS) cannot access OSS objects that have OSS ACLs that contain
optional ACL entries.
For J06.09 and later J-series RVUs and H06.20 and later H-series RVUs, access by the OSS Net-
work File System (NFS) to OSS objects that have OSS ACLs that contain optional ACL entries
can be allowed, depending upon the NFSPERMMAP attribute value for the fileset that contains
the object, however:
• The cp command does not copy any ACLs associated with the object.
• The permissions used when an object is created by the cp command depend on
the value of the NFSPERMMAP attribute for the fileset on the system that con-
tained the original file.
For more information about NFS and ACLs, see the acl(5) reference page.
This table describes the impact of ACLs on the permissions used when a new file or
directory is created by the cp command and the cp command is not issued from NFS.
Cases not included in the table represent impossible situations.
_______________________________________________________
cp Source Source Dest. Impact of
Command Fileset File/Dir Filesset ACLs on
Supports Supports Has Opt. Supports Permissions
ACLs ACLs ACLs ACLs of New File/Dir
_______________________________________________________
Y/N Y/N N N None
Y/N Y/N N Y See Note 2
Y/N Y Y N See Notes 1 and 3
N Y Y Y See Notes 1 and 2
Y Y Y Y See Note 4
_______________________________________________________
Note 1: The optional ACLs for the source file or directory are not copied to the
destination file or directory.
Note 2: If the destination parent directory has default ACL entries, those default
ACL entries are inherited by the new file or directory (see the acl(5)
reference page).
Note 3: If you use the -p flag, the file permissions are copied to the destination
file or directory and the class entry permissions in the ACL are used for
the destination file or directory group permissions. Otherwise, the per-
missions for the destination file or directory are set using the non-ACL
2−104 Hewlett-Packard Company 527188-021