Workaround on failed sudos: just do everything as root and chown back to galaxy