Error in starting TAR utility from the code.

Dear all:

I am having a problem in starting TAR from my code by using spawnl (). I use
TAR to create a new archive, and then in command line, I tested it by this
way:

tar -xf my_archive

it worked fine. while in one thread of my process, I use the following :

spawnl (P_WAIT, “tar”, “tar”, “-x”, “-f”, my_archive’s full path name,
NULL);

But it reported the following errors for each member in the archive:

tar: ./inc/file_name: Could not change access and modification times:
Permission denied
tar: ./inc/file_name: Cannot change mode to 0555: Not supported
tar: ./inc/file_name: Cannot chown to uid 0 gid 0: Not supported

Does anybody know what is causing the problem? What else I need to do before
spawnl ()? My process is started by another process which in turn is started
from the shell.

Any help is well appreicated, thanks.
Xuedong