Mode 0777 should be used for directories only because it results in executable entries (after typical umasks are applied). Reviewed-by: Arjun Shankar <arjun@redhat.com>