setup structure and add permission