Add necessary deps and fix permissions.