
라는 사용자에게 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 │
├────────────────┼────┼──────┼──────┼────────┼─────────┼────────┼─────┼───────────┼──────────┤
│ │
└────────────────┴────┴──────┴──────┴────────┴─────────┴────────┴─────┴───────────┴──────────┘
하지만 루트나 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