add stacks_root and rights parameters