Drush does not work after I sudo su to another user I have a CentOS 6 server with WHM/cPanel. I installed a global Drush as root using the instructions here (http://docs.drush.org/en/master/install/). Drush works fine for any user I ssh in as. However I typically ssh in as my user and then sudo su to the user I'm working on. When I do that I get these errors. If I ssh in as that user directly drush works fine. How can I make drush work when I su to a different user?

PHP Warning:  proc_open(): Descriptor item must be either an array or a File-Handle in phar:///usr/local/bin/drush/includes/startup.inc on line 366
Content-type: text/html; charset=UTF-8

&lt;br /&gt;
&lt;b&gt;Warning&lt;/b&gt;:  proc_open(): Descriptor item must be either an array or a File-Handle in &lt;b&gt;phar:///usr/local/bin/drush/includes/startup.inc&lt;/b&gt; on line &lt;b&gt;366&lt;/b&gt;&lt;br /&gt;
PHP Warning:  proc_get_status() expects parameter 1 to be resource, boolean given in phar:///usr/local/bin/drush/includes/startup.inc on line 367
&lt;br /&gt;
&lt;b&gt;Warning&lt;/b&gt;:  proc_get_status() expects parameter 1 to be resource, boolean given in &lt;b&gt;phar:///usr/local/bin/drush/includes/startup.inc&lt;/b&gt; on line &lt;b&gt;367&lt;/b&gt;&lt;br /&gt;
PHP Warning:  proc_close() expects parameter 1 to be resource, boolean given in phar:///usr/local/bin/drush/includes/startup.inc on line 368
&lt;br /&gt;
&lt;b&gt;Warning&lt;/b&gt;:  proc_close() expects parameter 1 to be resource, boolean given in &lt;b&gt;phar:///usr/local/bin/drush/includes/startup.inc&lt;/b&gt; on line &lt;b&gt;368&lt;/b&gt;&lt;br /&gt;


EDIT

So I got it to work. If I do
sudo su - newuser 
instead of
sudo su newuser it works.

I think it's related to CLI/CGI. PHP runs as CLI when I su with the - and CGI when I su without the -. Can anyone explain the difference the - makes?
Found the answer here:
https://superuser.com/questions/453988/whats-the-difference-between-su-with-and-without-hyphen


  The difference between "-" and "no hyphen" is that the latter keeps
  your existing environment (variables, etc); the former creates a new
  environment (with the settings of the actual user, not your own).