Set permissions properly