bug-tar
[Top][All Lists]
Advanced

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

[Bug-tar] bug with tar and preserving UID and GID over NFS


From: ajmcello
Subject: [Bug-tar] bug with tar and preserving UID and GID over NFS
Date: Thu, 25 Jun 2009 17:43:54 -0700


Hi. I thought I would forward this to the tar group. Is it possible to have tar fallback to UID and GID 0 or the owner and group of the person running tar in the event that it cannot change it, particularly over NFS?


On Thu, Jun 25, 2009 at 2:29 PM, Peter Eisentraut <address@hidden> wrote:
On Friday 26 June 2009 00:04:02 Alfred Monticello wrote:
> in doc/Makefile, tar is run to extract an archive with xf options. Needs
> oxf to map to owner of person running tar, otherwise Invalid Argument
> occurs and the Makefile errors out.
>
> A better solution might be to compact postgres as UID/GID 0 instead of UID
> 258 which does not exist on my system.
>
> Problem only occurs when mounting NFSv4 from a Solaris box using ZFS.
> Client is Ubuntu Jaunty. Tar tries to preserve UID 258 but errors out
> because it doesn't exist.

Are you running the extraction as root user?


Yes. I am user root. It is an interesting problem. Tar fails because it tries to preserve ownership and group.

However over an NFSv4 and ZFS, the NFS client where I am working on tries to remap unknown usernames and groups to nobody.nogroup, which tar does not seem to like. I tried GNU version 1.22 and it also failed the same way. I can manually run chown or chgrp to an unknown UID and GID, and they will get mapped as nobody.nogroup. So I guess the source of the problem really lies with tar...

I'm working on a new server and am building a several of source packages. Postgres and Apache httpd are the only two out of about 25 that have had this problem. Postgres had a problem as soon as I unpacked it with tar, it complained about UID 258. All the other packages I have unpacked with tar unpacked with 0 as the UID and GID.

# make
make -C doc all
make[1]: Entering directory `/nfs/fsp1/web/postgresql-8.3.7/doc'
gzip -d -c man.tar.gz | /bin/tar xf -
/bin/tar: man1/clusterdb.1: Cannot change ownership to uid 258, gid 258: Invalid argument
/bin/tar: Error exit delayed from previous errors
make[1]: *** [manl/.timestamp] Error 2
make[1]: Leaving directory `/nfs/fsp1/web/postgresql-8.3.7/doc'
make: *** [all] Error 2
#



reply via email to

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