From cce0652cc07fb084ffc31afdb0c2d1f179d1cfe3 Mon Sep 17 00:00:00 2001 From: tknew2 Date: Wed, 13 Nov 2013 12:07:30 +0100 Subject: [PATCH] add note to README.md about startup script --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 98bb7713..a5c51d75 100644 --- a/README.md +++ b/README.md @@ -209,7 +209,11 @@ It uses **System V init script** compatible with **Ubuntu and CentOS** (maybe it $ pm2 startup # then follow the command instruction ``` -The `-u username` option permits to specify which user have to start the process at startup. +### Running script as a different user + +The `-u username` option permits to specify which user has to start the process at startup. +**NOTE** that this user must have access to npm, apps and node ! So the best way is to log with this user `su -l www`, then do `pm2 startup -u www`. + Internally it uses `sudo -u $USER`.