PHP CLI Debug as a www-data user, remote SSH interpreter - sudo? How to?


I am running Docker container with the PHP 7.2.5 codebase. This container got SSH and my keys installed.

PHPStorm has the remote PHP interpreter over SSH configured.
It all works nicely, except my CLI scripts to run needs to run as a `www-data` user, not the SSH user.

When I debug scripts manually using CLI command I use this:
sudo -u www-data -E php -dxdebug.remote_autostart=On -dxdebug.remote_enable=true php script.php
which works perfectly fine.

Is there a way to specify "sudo" for PHPStorm?


1 comment


Looks like we need to have implemented.

Please vote for it with thumb up button.


Please sign in to leave a comment.