https://bugzilla.novell.com/show_bug.cgi?id=396996
User agruen@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=396996#c3
Andreas Gruenbacher
If dest_file does not exist, a file descriptor shall be obtained by performing actions equivalent to the open( ) function defined in the System Interfaces volume of IEEE Std 1003.1-2001 called using dest_file as the path argument, and the bitwise-inclusive OR of O_WRONLY and O_CREAT as the oflag argument. The file permission bits of source_file shall be the mode argument.
POSIX 1003.2c draft 17 further clarifies:
Note that in the absence of the ‘‘−p’’ option, the cp utility already specifies that new files are created using open(), specifying the file permission bits of the source file in the mode argument, and POSIX1e specifies the impact of default ACLs on open(). The result being that if there is a default ACL on the destination directory, the resulting ACL on the destination file will be the default ACL modified by the permission bits of the source file. This effectively will limit access to the newly created file to the minimum of accesses specified in the default ACL and the source file permissions. If the destination directory does not have a default ACL, then the permission bits of the newly created file will be the source file permission bits as modified by the umask.
In other words, the behavior is as expected. Use ‘‘cp -p’’ if you want to preserve ACLs. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.