[comp.unix] AFIO bug

smitty@essnj1 (Hibbard T. Smith JR) (07/04/90)

We have been using a PD cpio replacement called afio for several weeks.  It's
quicker than cpio, and handles links more intelligently.  Several of its 
options are opposite to their meaning in cpio.  Today however, a serious bug
became apparent.

I was in the process of upgrading a system to a new computer, and new (larger)
disks.  I saved the system to tape using find (with -depth) and afio while
running as root.  After startup of the new system, I (as root) did a complete
restore from the tapes.  After a short time, I started getting permission 
problems trying to write into my own directories. Other users began to make
similar complaints.  Upon examination I found that all directories which did
not already exist when I began the restore, and were not empty on the tape,
now belonged to root, instead of their original owners.  Furthermore, their
permissions bore little resemblance to the originals.  Looking at some source
for afio revealed that the depth option to find was responsible for the
trouble.  Afio just does not handle that properly.  I'm so used to using 
-depth when doing a full save, that it's almost automatic.  We could
find no documented restrictions on this use of afio.  

The result of this was several hours of manually changing owners, groups, and
modes in several hundred directories.  :-(   

If anyone else has run across this, or better yet fixed afio, plaese email
me your solution.  If I don't receive anything, I'll hack at it myself.

Thanks for any help or advice.....

-- 
		Smitty
-------------------------------------------
Hibbard T. Smith JR                 	 ESSNJAY Systems Inc.
uunet!hsi!essnj1!smitty