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

Re: dpkg-deb strangeness on buster



J. H. M. Dassen wrote to me, in private email (which I'm sure he won't
mind me posting):
> /debian.org/ftp/debian/binary//tex/latex-2e.deb
> tar: cannot change mode of file . to 1517 : Operation not permitted
> /debian.org/ftp/debian/binary//tex/bibtex-0.99c.deb
> tar: cannot change mode of file . to 1517 : Operation not permitted
> /debian.org/ftp/debian/binary//tex/mfaddfnt-1.0.deb
> tar: cannot change mode of file . to 1517 : Operation not permitted

I've investigated, and I can see what's going on now.

Those packages have a control archive (the first half of the .deb
file) which contains a `.'  directory with the setgid bit set.

dpkg-deb feeds the archive to tar -x, which attempts to set the setgid
bit on the directory into which it is extracting, which is in /tmp.
However, the directory inherits the group ownership (`bin') from its
parent, and that means that tar isn't allowed to set the setgid bit.
tar reports the resulting error.

The question is, who is at fault ?

The way /tmp is mounted, for creating files by default with
permissions you can't set ?

dpkg-deb when the package was built, for including `.' ?

The package maintainer, for running dpkg-deb with DEBIAN setgid ?

dpkg-deb when the info is extracted, somehow ?

tar, for producing the message ?  (Getting desperate here.)

The BSD kernel, somehow ?  (Really grasping at straws.)

Any and all suggestions are welcome.  Note that the .deb archive
format is going to change eventually, and then this problem will go
away, but that isn't nearly quick enough a solution.

Ian.

(Ray: from now on, please write to me at the address above again.)


Reply to: