Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jul 1996 06:54:25 +0200 (MET DST)
From:      J Wunsch <j@uriah.heep.sax.de>
To:        fbugs@jraynard.demon.co.uk (James Raynard)
Cc:        bde@zeta.org.au, zach@blizzard.gaffaneys.com, freebsd-bugs@freefall.freebsd.org
Subject:   Re: bin/1375: Extraneous warning from mv(1)
Message-ID:  <199607120454.GAA18579@uriah.heep.sax.de>
In-Reply-To: <199607111719.RAA01997@jraynard.demon.co.uk> from James Raynard at "Jul 11, 96 05:19:51 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
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. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607120454.GAA18579>