* Craig A. Berry <craig.a.berry@gmail.com> [2008-06-09 15:05]: > Before Abigail's patch, the Unix copy() did roughly what the > VMS and Win32 syscopy() implementations do: it followed "new > file" semantics and created the target file with permissions > inherited from the target environment. Except, there is no such thing as permissions inherited from the target environment on Unix. Maybe you could consider the exec bits on the directories that are part of a file’s path some kind of permission inheritance, but even that is a bit of a stretch. > I don't like the fact that copying from a handle now gives > different behavior permissions-wise than copying from a > filename, but that inconsistency could be ironed out pretty > easily. I always argued that the code to preserve permissions should go into `syscopy` on Unix, not `copy`. If, as Charles seems to have been suggesting, `cp` was aliased depending on platform to *either* `copy` *or* `syscopy` such that it emulated the platform copy program, that would be ideal. Then people could explicitly ask for either behaviour when they mean it, or could use the DWIM alias (which is also shortest to type) when upgrading scripts from sh/CMD.EXE/DCL/whatever. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>Thread Previous | Thread Next