Open wetherallCode opened 7 years ago
I have the same issue on my AWS EC2 remote server. Any news?
I had path : '$HOME/www/app
and changing to path : '/home/deployer/www/app
fiexed the issue
You are trying to create the directory at the root level which is not permitted. Try changing the path to something like '/home/ec2-user/Users'.
To determine the actual folder path, ssh into your ec2 instance and run cd /home && ls
. You will get to know the the folder under /home where you can create the directory (ec2-user for me).
when i install forever with the command "# npm install -g forever", i got this "▐ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟ WARN engine forever@3.0.2: wanted: {"node":">=6"} (current: {"node":"4.2.6","npm":"3.5.2"}) loadDep:yargs → 200 ▀ ╢██████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟ npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated loadDep:urix ▐ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟ /usr/local/bin/forever -> /usr/local/lib/node_modules/forever/bin/forever /usr/local/lib └── forever@3.0.2
npm WARN optional Skipping failed optional dependency /forever/chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.13
When I run pm2 deploy production setup I get this in return
--> Deploying to production environment --> on host 67.205.178.187 ○ hook pre-setup deploy@67.205.178.187's password: mkdir: cannot create directory ‘/Users’: Permission denied mkdir: cannot create directory ‘/Users’: Permission denied mkdir: cannot create directory ‘/Users’: Permission denied
setup paths failed
Deploy failed
Why does this happen?