Re: feature or bug ?

Tom Lees (tom@lpsg.demon.co.uk)
5 Apr 1996 20:25:51 +0100


Mathieu Guillaume (Mat@guillaum.via.ecp.fr) wrote:
: Hi. I noticed something with file handling. I dunno if it's normal
: behaviour or not, but it seemed strange to me :
: say you have two files, file1 and file2 in dir1 and dir2. If you do a 'cp
: /dir1/file1 /dir2/file2', the 'new' file2 has the permissions, user and
: group of the former file2 instead of those of file1.
: Should this be changed ?

This is because 'cp' does not remove the destination file before 'creat'ing
it. I construe this as a feature, as, in order to write to the second file,
you must have permissions for it anyway.

--
Tom Lees <tom@lpsg.demon.co.uk>

Laws of Serendipity:

(1) In order to discover anything, you must be looking for something. (2) If you wish to make an improved product, you must already be engaged in making an inferior one.