>>Sorry if this is an known problem, but if anyone knows what might be the causes
>>of this problem, it's very much appreciated!
>>
>>Platform:      IBM RS6000 running AIX 3.2.5
>>AFS version:   3.3
>>
>>Problem:
>>
>>A CD-ROM reader (/dev/rmt0) is mounted under directory /cdrom
>>A tar file (ABC.TAR) in the CD-ROM and the access path is /cdrom/ABC.TAR
>>
>>When in the AFS filesystem where user has write permission, issuing the 
>>following command:
>>
>>tar xpvfb /cdrom/ABC.TAR 20
>>
>>will cause the following error messages:
>>
>>tar: cannot change mode of file . to 1517 : Permission denied
>>tar: cannot change mode of file ./dirname/filea to 1517 : Permission denied
>>tar: cannot change mode of file ./dirname/fileb to 1517 : Permission denied
>>tar: cannot change mode of file . to 1517 : Permission denied
>>
>>Am I missing something here?
>>
>>Any help is very much appreciated!

We saw a similar problem with DFS and tar.  Your problem may
be with the way tar works wrt super-user permissions and the order
in which it attempts the chmod/chown directories (before writing
files in them).  Here is a work-around we found:

Using the pax command as an alternative to tar seems to work around
the problem.  pax apparently does not depend on root super-user privileges
and is smart enough to defer changing intermediate directory ownership 
and permissions so the files and dirs can be created in it.  I was able
to use (pax -rvk -f file.tar) to extract a tar image that failed
with tar. Note the -p o flag can be used to preserve user and group IDs 
on the restored files.  Using this option seemed to work for me also
where tar would not.  One thing to be careful of though.  If the
tar image contains an entry for ./ , then the -k flag may be
necessary.  This prevents pax from writing over existing files and
dirs which will keep it from possibly changing the permissions
on /. so that the rest of the files cannot be restored.

Thanks, Dawn

Reply via email to