# Getting the root directory of a chef solo run

**URL:** <https://discourse.chef.io/t/getting-the-root-directory-of-a-chef-solo-run/2425>\
**Category:** Chef Infra (archive)\
**Created:** [January 7, 2012, 11:51pm UTC](https://discourse.chef.io/t/getting-the-root-directory-of-a-chef-solo-run/2425 "2012-01-07T23:51:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim\_Uckun](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/tim_uckun/32/751_2.png) [@Tim\_Uckun](https://discourse.chef.io/u/Tim_Uckun)\
**Post date:** [January 7, 2012, 11:51pm UTC](https://discourse.chef.io/t/getting-the-root-directory-of-a-chef-solo-run/2425/1 "2012-01-07T23:51:07Z")

</div>

What is the best way to get the root directory of a chef solo run? I  
have been using File.expand\_path(File.dirname( **FILE** ) + "/…/…/…/"  
type things but there must be a cleaner way to deal with that.
