Fixed process to chmod after setting up hooks.