#467024 dpkg: "control directory has bad permissions" message could be more helpful

Package:
dpkg
Source:
dpkg
Description:
Debian package management system
Submitter:
Peter Gervai
Date:
2010-04-21 02:03:15 UTC
Severity:
wishlist
#467024#5
Date:
2008-02-22 14:34:14 UTC
From:
To:
The message

dpkg-deb: control directory has bad permissions 2755 (must be >=0755 and <=0775)make: *** [binary-arch] Error 2

should include this hint, because it's pretty hard to figure out anyway:

"(maybe you're building in a setgid directory?)"

..because exactly that's what usually happening.

Thanks.

#467024#10
Date:
2008-02-22 21:44:38 UTC
From:
To:
Peter Gervai writes ("Bug#467024: dpkg: "control directory has bad permissions" message  could be more helpful"):

Someone building a package should know that the problem with an actual
mode of 2755 when compared with a maximum of 0775 is that 2755 has bit
2000 set, and that 2000 is the setgid bit.  If there is any confusion
at all then the relevant manpages (eg, chmod, I think) ought to answer
it.

So I think this error message is abundantly clear to its intended
target audience.

Ian.

#467024#15
Date:
2008-02-23 20:56:17 UTC
From:
To:
Grepping to the string "control directory" in the doc dir did not come
up with an obvious answer. Since I have figured it out why the
"control directory" became setgid (since it have been created by dpkg
itself, so dpkg seemed to have been the culprit) I need no further
clarification of the message, but a brief googling popped up several
cases of the said problem without solution (or with partial, obviosuly
wrong solutions based on wrong analysis) so it have seemed to me that
there are definitely people who are using the code in question (which
is the target audience of a message given by the code) and do not have
the immediate oversight to be able to solve the problem. Took me 5-10
minutes, and I tend to believe I know what I'm doing.

But its your package, your style. It's a way to make life more
hackish, letting the user to look up the relevant information in his
spare time. (Or, as you suggest, not to compile anything unless one's
completely familiar with everything, which is a different approach
from being helpful.)

Thanks for the explanation.

Peter

#467024#20
Date:
2008-02-23 21:29:11 UTC
From:
To:
Hi,

What package were you trying to build? I believe that any modern package
using debhelper or similar tools probably fixes the right on the temporary
directory (thought I haven't checked).

It's not obvious to everybody and I dislike the way you ditch such user
problems. Maybe changing the error message is not the best solution, that
doesn't mean there's nothing to improve.

Why doesn't dpkg-deb fix the right on the directory by removing any
special rights for example?

I think you have no idea how many users may want to recompile packages
occasionnaly.

Cheers,

#467024#25
Date:
2008-02-24 07:43:55 UTC
From:
To:
reopen 467024
tag 467024 - patch
thanks

I agree, this should be improved one way or another.

regards,
guillem

#467024#34
Date:
2008-02-24 13:56:15 UTC
From:
To:
Raphael Hertzog writes ("Re: Bug#467024: dpkg: "control directory has bad permissions" 	message could be more helpful"):

This is not a `user' problem, in that sense.  It is a developer
problem.

The developer might have been trying to deliberately create a setgid
directory.

The package has a bug if this message happens just because you build
it in a setgid directory.

Ian.

#467024#39
Date:
2008-02-28 01:11:56 UTC
From:
To:
It's been make-kpkg in my case, but I'd guess it would be tough to
find a package with wouldn't choke on it.

Peter

#467024#44
Date:
2008-02-28 18:59:23 UTC
From:
To:
DPeter Gervai writes ("Re: Bug#467024: dpkg: "control directory has bad permissions" message could be more helpful"):

My home directory and all of the ordinary subdirectories of it are
setgid so I'm sure I would notice if this was a general problem.

I think we should try to find out what's actually going on here so
that we can fix it.  Something is wrong and atm I don't see where.

Ian.