title: Can you start a process inside a Docker container as root, while having the default user of an exec call be non-root?
body: <p>I'm basically trying to run <code>crond -f</code> as root, while having the default user be something different.</p>
  
  <p>Since the crontabs it runs use sensitive information from other files on the image, I want to give root access to these files, start the crond process, then switch the user to a newly created one.  This way the cronjobs will be able to get the information they need, while securing the sensitive files in the container from anyone who may get exec access. </p>
  
  <p>have tried a couple things like this:</p>
  
  <pre><code>USER root
  
  CMD ["./runCrons.sh"]
  
  USER newuser
  </code></pre>
  
  <p>But this does not run the crond process as root, but as newuser.</p>
  
  <p>If anyone has a solution it would save me some digging and experimentation.</p>