dotcloud/docker — pull request #1267 by sridatta (2013-07-22 22:24:56+00:00)
Title: Fix to "Inject dockerinit at /.dockerinit"

This is a modification to pull request 898 by @shykes. It fixes the issue where the `TestUser` unit test fails when running a command as a non-root user.

The `_dockerinit` directory was being created with 0700 permissions, which can only be read as root. `SysInit` could not read the container's rootfs when it dropped to a non-root uid, since `_dockerinit` is an AUFS branch of the rootfs. This caused all commands to fail when not run as root.

The fix is to set permissions of the `_dockerinit` directory to 0755, which matches the permissions of the `layer` directories of all other images.