---
title: Ensure that All Entries in The Path of Root Are Directories
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > OOTB Rules > Ensure that All Entries in The Path of
  Root Are Directories
---

# Ensure that All Entries in The Path of Root Are Directories
 
## Description{% #description %}

For each element in root's path, run:

```
# ls -ld DIR
         
```

and ensure that the entry is a directory.

## Rationale{% #rationale %}

Locations in root's path that are not directories could cause unexpected behavior, such as executing scripts from unintended locations. Ensuring that all locations in root's path are directories helps maintain a secure environment for root.
