[Bug 186293] tar(1): Problems with tar on FreeBSD 10.0

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Jun 26 16:27:53 UTC 2014


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=186293

jnaughto at ee.ryerson.ca changed:

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

--- Comment #4 from jnaughto at 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 at 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 at NFSClient:/tmp # tar cf foobar.tar foobar

root at 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 at NFSCLient:/tmp # cd  <NFSMOUNT>
root at NFSClient:/<NFSMOUNT> # tar xf /tmp/foobar.tar
root at NFSClient:/<NFSMOUNT> # cd foobar 
root at 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 at NFSCLient:/<NFSMOUNT> # cp /tmp/foobar.tar .

root at NFSServer:/<NFS-Exported-Filesystem> # tar xf foobar.tar
root at NFSServer:/<NFS-Exported-Filesystem> # cd foobar
root at 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.


More information about the freebsd-bugs mailing list