Fixes pile permissions