Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jun 2014 16:27:53 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 186293] tar(1): Problems with tar on FreeBSD 10.0
Message-ID:  <bug-186293-8-THapxfcdcZ@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-186293-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-186293-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=186293

jnaughto@ee.ryerson.ca changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jnaughto@ee.ryerson.ca

--- Comment #4 from jnaughto@ee.ryerson.ca ---
Okay so it seems that this bug is also specific to NFSv3.   Tried a few tests
with Solaris 10 server exporting NFSv3/NFSv2 filesystems to Freebsd 10 clients.
  If we mount the filesystem specifically with NFSv2 specified in the
/etc/fstab the problem goes away.   Yet when we switch directly to NFSv3 in
/etc/fstab the problem is back.   It seems to be specific to regular files as
directories are created correctly with proper permissions.  The files are also
created with correct ownership but the permissions are 0000.  It doesn't have
anything to do with the tar specifically.  For example on the Freebsd 10 client
I created:

root@NFSClient:/tmp # ls -ld foobar/*
-rw-r--r--  1 root      wheel  0 Jun 26 10:55 foobar/jack
-rw-r--r--  1 simon     wheel  0 Jun 26 10:55 foobar/simon
-rw-r--r--  1 tom       wheel  0 Jun 26 10:55 foobar/tom

root@NFSClient:/tmp # tar cf foobar.tar foobar

root@NFSCLient:/tmp # tar tvf foobar.tar
drwxr-xr-x  0 root   wheel       0 Jun 26 10:55 foobar/
-rw-r--r--  0 tom    wheel       0 Jun 26 10:55 foobar/tom
-rw-r--r--  0 root     wheel       0 Jun 26 10:55 foobar/jack
-rw-r--r--  0 simon    wheel       0 Jun 26 10:55 foobar/simon

It seems that if I untar this file into the NFS filesystem (with the server
allowing root on the client to create files/chown/chmod) the perms are:

root@NFSCLient:/tmp # cd  <NFSMOUNT>
root@NFSClient:/<NFSMOUNT> # tar xf /tmp/foobar.tar
root@NFSClient:/<NFSMOUNT> # cd foobar 
root@NFSClient:/<NFSMOUNT>/foobar # ls -l
total 2
----------  1 root      wheel  0 Jun 26 10:55 jack
----------  1 simon     wheel  0 Jun 26 10:55 simon
----------  1 tom       wheel  0 Jun 26 10:55 tom

Yet if I copy the tar file into the <NFSMOUNT> directory and go to the NFS
server and extract the same file the permissions are correct:

root@NFSCLient:/<NFSMOUNT> # cp /tmp/foobar.tar .

root@NFSServer:/<NFS-Exported-Filesystem> # tar xf foobar.tar
root@NFSServer:/<NFS-Exported-Filesystem> # cd foobar
root@NFSServer:/<NFS-Exported-Filesystem>/foobar # ls -l 
total 3
-rw-r--r--   1 root     root           0 Jun 26 10:55 jack
-rw-r--r--   1 simon    root           0 Jun 26 10:55 simon
-rw-r--r--   1 tom      root           0 Jun 26 10:55 tom

So now the creation of the tar file is not the issue.  It seems that only when
the files are extracted on the NFSv3 mounted filesystem does this occur.  If
you change the NFS mount option to NFSv2 the problem goes away...

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-186293-8-THapxfcdcZ>