別のユーザーとしてコマンドを実行することはできません - ルートユーザーからでも実行できません

別のユーザーとしてコマンドを実行することはできません - ルートユーザーからでも実行できません

というユーザーに pm2 ノード モジュールをインストールしましたotheruser。ユーザーからプログラムを実行する必要がありますroot

通常通りログインしotheruserて何らかのアクションを実行すると、正常に動作します。

otheruser@bubble-server:~$ /home/otheruser/.nvm/versions/node/v5.2.0/bin/pm2 list
● Agent online - public key: xxxxxxxx - machine name: server - Web access: https://app.keymetrics.io/
┌────────────────┬────┬──────┬──────┬────────┬─────────┬────────┬─────┬───────────┬──────────┐
│ App name       │ id │ mode │ pid  │ status │ restart │ uptime │ cpu │ mem       │ watching │
├────────────────┼────┼──────┼──────┼────────┼─────────┼────────┼─────┼───────────┼──────────┤
│                                                                                            │
└────────────────┴────┴──────┴──────┴────────┴─────────┴────────┴─────┴───────────┴──────────┘

しかし、root または otheruser 以外のユーザーとしてログインした場合は機能しません。

root@server:~# su -s /bin/bash -c "/home/otheruser/.nvm/versions/node/v5.2.0/bin/pm2 list" otheruser
root@server:~#

syslogに次のように出力されます

server node[25227]: No AX.25 port data configured

関連情報