When I compile and install tarballs using the usual
sudo make install, the files and directories created always have wrong permissions. In particular, nothing that should have the group and user execute bits actually has them. I've been making do by tee-ing a copy of the make log and chmod-ing things as appropriate, but that's gotten increasingly annoying.
For example, I just tried to install the latest version of OCaml by its tarball using
make world, and
sudo make install. The result is that every
/usr/local/bin/ocaml* has permissions
0744 rather than
0755 as you'd expect. Subdirectories in
/usr/local/lib/ocaml/ also have
0744 bits, preventing anyone who's not root from using those libraries.
umask 022 before
make install in a root shell is fruitless, as well. Furthermore, I have never had this problem with non-Ubuntu distributions, for what that's worth.
Like I said, this happens with all tarballs I use, so an answer like "
sudo apt-get install ocaml" is missing the point.