Mindera/pm2-cookbook

:startup generates dump file as root instead of using user if provided in version 0.7.1+

Opened this issue · 0 comments

The following was added to providers/application.rb in commit 354060c

The following was added:

Save running processes

cmd = 'pm2 save'
execute cmd do
environment pm2_environment
command cmd
end

This block either needs to specify the user (if provided) or use the built-in pm2_command like this:

Save running processes

pm2_command('save')

Otherwise the file is executed as the current user (typically root) and causes permission errors when trying to run as the correct user.