autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problematic use of mv(1)


From: Peter Simons
Subject: Problematic use of mv(1)
Date: Mon, 13 Aug 2001 13:53:03 +0200

Hi,

I recently upgraded to Autoconf version 2.52 and noticed the following
problem on FreeBSD 4.3:

 | configure: creating ./config.status
 | config.status: creating xds.h
 | mv: xds.h: set owner/group (was: 10003/0): Operation not permitted
 | config.status: creating xds-config
 | mv: xds-config: set owner/group (was: 10003/0): Operation not permitted
 | config.status: creating Makefile
 | mv: Makefile: set owner/group (was: 10003/0): Operation not permitted
 | config.status: creating docs/Makefile
 | mv: docs/Makefile: set owner/group (was: 10003/0): Operation not permitted
 | config.status: creating config.h

What happens is that the configure script creates these files in /tmp
and mv(1)s them to the target location -- my home directory in this
case. The file generated in /tmp are owned by the group 'bin' because
/tmp is owned by 'bin'. The mv command tries to preserve the ownership
of the files when moving them to my home, but since my user is not a
member of group 'bin' the chown(2) fails.

In general using mv here seems to be dangerous because many older
systems do not allow mv'ing files from one file system to another one;
often /tmp is on a different file system than the home directories. In
this case the configure script would fail entirely.

My guess is that it would be best to substitute mv by successive cp(1)
and rm(1) call.

        -peter



reply via email to

[Prev in Thread] Current Thread [Next in Thread]