Weird make-kpkg error

I was trying to build a custom kernel for my Ubuntu 8.04 laptop, and I got the following error message:

dpkg-deb: building package linux-image-2.6.25.4-rt6-gj01' in../linux-image-2.6.25.4-rt6-gj012.6.25.4-rt6-gj01-01.GBJ.Customi386.deb’.
dpkg-deb: control directory has bad permissions 2755 (must be >=0755 and <=0775)
make[1]: *** [debian/linux-image-2.6.25.4-rt6-gj01] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.25.4?
make: *** [binary/linux-image-2.6.25.4-rt6-gj01] Error 2

I changed the permissions of debian/control but the 2755 permissions ended up being re-applied. It turns out that somehow the entire kernel source directory was set GUID. To solve it, I simply did

chmod g-s /usr/src/linux-2.6.25.4 -R

Of course you should put in the details that match your environment.

Also, for the less experienced, set guid looks like this when do an ls -l

drwxr-sr-x 23 root src 4096 2008-06-14 10:31 linux-2.6.25.4

The correct permissions look like this:

drwxr-xr-x 23 username src 4096 2008-06-14 10:31 linux-2.6.25.4