set correct permissions for all enclosing folders