Error when trying to self-update composer

composer-php, macos, sudo, terminal

Solution

In terminal with sudo I type full path to composer.phar and it's work for me!

sudo /usr/bin/composer.phar self-update

Problem

when I trying to self-update composer I get "Permission denied" error message, but when I try to do same command with "sudo" - I get error message "command not found". Please help me..

Original source