set permissions properly