There is also a cucumber test for the files permissions:
https://github.com/VojtechVitek/origin-server/commit/8358128dfed16916536eb913a49e27eb4a6f5024