title: /var/cache/debconf/config.dat-new: Permission denied
body: <p>I'm getting <code>debconf: DbDriver \"passwords\" warning: could not open /var/cache/debconf/passwords.dat: Permission denied\ndebconf: DbDriver \"config\": could not write /var/cache/debconf/config.dat-new: Permission denied\n#&gt; [packages]: Packages : FAIL\n"</code> when I run this. Looks like it isn't sudoing for whatever reason.</p>
  
  <pre><code>(ns localhost.idk
    (:require (pallet [compute :as compute]
                      [api :as api :refer [lift]]
                      [actions :as actions])))
  
  ;; Running this on my local machine
  (def my-data-center
    (compute/instantiate-provider
     "node-list"
     :node-list [["localhost" "ed" "127.0.0.1" :ubuntu
                  :is-64bit nil]]))
  
  (def user-deadghost
    (api/make-user "deadghost"
                   :password "my-pw"
                   :sudo-password nil)) ; pwless sudo set up
  
  (defn install-ed []
    (pallet.api/lift
     (pallet.api/group-spec
      "ed"
      :phases {:configure (api/plan-fn
                           ;; This works:
                           ;; (pallet.actions/exec-script
                           ;;  ("sudo aptitude install ed"))
                           ;; This is trying to run without sudo:
                            (actions/packages :aptitude ["ed"]))})                         
                           ;; log shows: p.script-builder prefix kw :no-sudo
     :compute my-data-center
     :user user-deadghost))
  </code></pre>
  
  <p>Script it's running:</p>
  
  <pre><code>#!/usr/bin/env bash
  mkdir -p /home/deadghost || exit 1
  cd /home/deadghost
  set -h
  echo '[packages]: Packages...';
  {
      { debconf-set-selections &lt;&lt;EOF
  debconf debconf/frontend select noninteractive
  debconf debconf/frontend seen false
  EOF
      } &amp;&amp; enableStart() {
          rm /usr/sbin/policy-rc.d
      } &amp;&amp; apt-get -q -y install ed+ &amp;&amp; dpkg --get-selections
  } || { echo '#&gt; [packages]: Packages : FAIL'; exit 1;} &gt;&amp;2 
  echo '#&gt; [packages]: Packages : SUCCESS'
  
  exit $?
  </code></pre>
  
  <p>The error I'm receiving is consistent with the <code>debconf</code> portion not having <code>sudo</code>.</p>