You must run the command from inside the mattermost
directory. So for you the commands would be something like this:
cd /opt/gitlab/embedded/bin
sudo su mattermost ./mattermost roles system_admin traxwriter -c /var/opt/gitlab/mattermost/config.json