call --set-permissions properly