Instead of 0666, could you bitwise or the various flags together? That would be a little more readable:
http://docs.python.org/2/library/os.html#os.chmod