Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Oct 2014 15:48:45 +1100
From:      John Marshall <john.marshall@riverwillow.com.au>
To:        "John D. Hendrickson and Sara Darnell" <johnandsara2@cox.net>
Cc:        freebsd-bugs@FreeBSD.org
Subject:   Re: [Bug 194477] 10.1-RC1 tar(1) spurious directory permission error message
Message-ID:  <20141028044845.GB5687@rwpc15.gfn.riverwillow.net.au>
In-Reply-To: <544EE93A.8040707@cox.net>
References:  <bug-194477-8@https.bugs.freebsd.org/bugzilla/> <6PZF1p00b2X408g01PZGNi> <544EE93A.8040707@cox.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--Dxnq1zWXvFF0Q93v
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, 27 Oct 2014, 19:54 -0500, John D. Hendrickson and Sara Darnell wrot=
e:
> bugzilla-noreply@freebsd.org wrote:
> > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D194477
> >=20
> > --- Comment #1 from John Marshall <John.Marshall@riverwillow.com.au> ---
> > Confirmed independently on -stable@
> >=20
> > https://lists.freebsd.org/pipermail/freebsd-stable/2014-October/080685.=
html
> >=20
> > The scenario of traversal-only access to the parent directory is common=
 in a
> > situation where the directory contains per-user subdirectories, and eac=
h user
> > has no business knowing about any subdirectory but his own.
> >=20
> > The archive generated is fine, the user has full permission to the dire=
ctory
> > being archived, but tar(1) exits with an error status.
> >=20
> > I regard this regression as a bug.
> >=20
>=20
> i'll bite very interesting
>=20
> is the error on tar or utar ?  i assume you mean on tar -c but be=20
> specific

[as per Bug 194477 report] tar -c -C

> is this new or do older version NOT do this?  if so please state the=20
>   right and wrong tar versions.

[as per Bug 194477 report] Bug observed in 10.1-RC3.  Fine =3D< 9.3-RELEASE

> also i need a firm permission basis.  just because you are in same=20
> group may not be the same as owning (w/respect to utar, not tar) and=20
> if your using any "kernel extended permissions" (tar obviously uses=20
> only unix file security / bits.  it stores file perms also user # in=20
> tar header)

Specific permissions documented in Bug 194477 report.  Error is
triggered if process running tar -c -C <dir> . does not have +r access
to the parent of the directory <dir>.  If the tar process has +x access
only to the parent of the -C <dir> (and full access to <dir>) then the
tar archive is written correctly but tar exits with an error because it
cannot read <dir>'s parent directory.  It looks like the earlier tar
used chdir() to walk back up the tree at the end whereas the current tar
uses openat() and tries to openat() the parent of <dir> after the <dir>
tree has been processed - and fails due to lack of +r access.

> i don't see any follow-ups just the initial comlaint, did this=20
> complain expire ?

Nobody has picked this up yet but another user on -stable@ confirmed the
problem and provided an even simpler test case.

--=20
John Marshall

--Dxnq1zWXvFF0Q93v
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlRPIC0ACgkQw/tAaKKahKIs+gCgxbQtX3NmzjdKwgEeA6Thpznx
05EAniv+2WYvR70BQX2+/VWG7Pr6xUgv
=2IRX
-----END PGP SIGNATURE-----

--Dxnq1zWXvFF0Q93v--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141028044845.GB5687>