I'm not great with server admin stuff but have to sometimes handle installs. The situation is the global composer is not using the correct version of PHP so I put locally to their /var/www/html a composer.phar so I can manually use the PHP version I want like: /custom/php/version/php composer.phar
They give me a SSH user in Ubuntu that has SUDO permissions. If I don't run the composer commands with SUDO it gives permissions errors. But I'm not supposed to use SUDO / root with composer so how should I handle this? Do I need to add my SSH user to the same group as www-data, or what is the correct way? Another way I thought would be to SU to the www-data user but not sure what way is correct.