Change the permission of certificate directories