From owner-freebsd-bugs Thu Jul 11 22:25:43 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id WAA01605 for bugs-outgoing; Thu, 11 Jul 1996 22:25:43 -0700 (PDT) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id WAA01579 for ; Thu, 11 Jul 1996 22:25:10 -0700 (PDT) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id HAA09329; Fri, 12 Jul 1996 07:22:55 +0200 Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id HAA25409; Fri, 12 Jul 1996 07:22:49 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.7.5/8.6.9) id GAA18579; Fri, 12 Jul 1996 06:54:25 +0200 (MET DST) From: J Wunsch Message-Id: <199607120454.GAA18579@uriah.heep.sax.de> Subject: Re: bin/1375: Extraneous warning from mv(1) To: fbugs@jraynard.demon.co.uk (James Raynard) Date: Fri, 12 Jul 1996 06:54:25 +0200 (MET DST) Cc: bde@zeta.org.au, zach@blizzard.gaffaneys.com, freebsd-bugs@freefall.freebsd.org Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199607111719.RAA01997@jraynard.demon.co.uk> from James Raynard at "Jul 11, 96 05:19:51 pm" X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk As James Raynard wrote: > > Archivers should behave more like cp. > > Does cp actually do the wrong thing in any cases? What should cp -p > > do with the mode if it can't preserve the ids? > > Does POSIX.2 say anything relevant to this discussion? cp -p: If the user ID or the group ID cannot be duplicated, the file permission bits S_ISUID and S_ISGID shall be cleared. If these bits are present in the source file but are not duplicated in the destination file, it is unspecified whether cp writes a diagnostic message to standard error. mv (across file systems, if necessary): (5) The file hierarchy rooted in source_file shall be duplicated as a file hierarchy rooted in the destination path. The following characteristics of each file in the file hierarchy shall be duplicated: (a) The time of last data modification and time of last access. (b) The user ID and group ID. (c) The file mode. If the user ID, group ID, or file mode of a regular file cannot be duplicated, the file mode bits S_ISUID and S_ISGID shall not be duplicated. [...] If the duplication of the file hierarchy fails for any reason, mv shall write a diagnostic message to standard error, do nothing more with the current source_file, and go on to any remaining source_files. If the duplication of the file characteristics fails for any reason, mv shall write a diagnostic message to standard error, but this failure shall not cause mv to modify its exit status. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)