set directory permissions properly