finish off deployment scripts
fixes to permissions