ensure correct permissions