pm2: 5.1.2
node: v16.13.1
Rocky Linux release 8.7 (Green Obsidian)
Problem:
pm2 is constantly restarting the nodejs application every minute.
I saved a file inside a subfolder with VS Code and Transmit (FTP Software) one hour ago.
Change detected on path /css-js/Chart.min.js for app nodejs_application - restarting PM2 | Stopping app:nodejs_application id:16
Cause:
We have a cronjob, that is fixing folder rights
* * * * * chown shop_user:sftponly -R /usr/local/www/node_application/*
Question:
Can I exclude watching the file users and rights?
Why is there a change detected, if the owner and rights of a file has been adjusted once with this cronjob? The chown should only adjust it once.
pm2: 5.1.2 node: v16.13.1 Rocky Linux release 8.7 (Green Obsidian)
Problem: pm2 is constantly restarting the nodejs application every minute. I saved a file inside a subfolder with VS Code and Transmit (FTP Software) one hour ago.
Change detected on path /css-js/Chart.min.js for app nodejs_application - restarting PM2 | Stopping app:nodejs_application id:16
Cause: We have a cronjob, that is fixing folder rights
* * * * * chown shop_user:sftponly -R /usr/local/www/node_application/*
Config - pm2-process.json:
{ "script": "index.js", "watch": true, "ignore_watch": ["log",".git",".ssh","node_modules"], "watch_delay": 1000, "watch_options": { "followSymlinks": false }, "name": "node_application" }
Question: Can I exclude watching the file users and rights? Why is there a change detected, if the owner and rights of a file has been adjusted once with this cronjob? The chown should only adjust it once.