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.
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.
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
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,
reopen 467024 tag 467024 - patch thanks I agree, this should be improved one way or another. regards, guillem
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.
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
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.