derive file permissions based on path