Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission denied / Verbose mode #43

Open
cunneen opened this issue Dec 21, 2016 · 4 comments
Open

Permission denied / Verbose mode #43

cunneen opened this issue Dec 21, 2016 · 4 comments

Comments

@cunneen
Copy link

cunneen commented Dec 21, 2016

Hi, I'm unable to get this working on ubuntu 16.04.

First I got "permission denied" errors for creating the destination folders on the server:

ERROR: mkdir: cannot create directory ‘/opt/pm2-meteor’: Permission denied

Then after creating that manually I got "permission denied" for the subfolders:

ERROR: mkdir: cannot create directory ‘/opt/pm2-meteor/my-app’: Permission denied

(and again for the backups folder).

After creating all those folders manually (as the user I've told pm2-meteor to use), I now just get "Permission denied" without any information about what it's trying to get permission for.

$ pm2-meteor deploy
Building your app and deploying to host machine //Users/me/Documents/Development/my-app/.pm2_deploy/bundle.tar.gz
/opt/pm2-meteor/my-app/bundle.tar.gz

ERROR: Permission denied

Some more information would be helpful.

@cunneen
Copy link
Author

cunneen commented Dec 21, 2016

It's failing at the scp (session.copy) in remoteTasks.js .

@cunneen
Copy link
Author

cunneen commented Dec 22, 2016

Turned out to be the permissions of the remote directories I manually created (duh).

I'll leave this open as I believe the pm2-meteor tool should have created these; I'd specified the user in the pm2-meteor file, and that user had sudo access at the time. Also the error reporting could be improved.

Thanks for making this tool available; now that I have it working I think I'll enjoy it!

@maxcabrera
Copy link

Hello @cunneen, could you explain a bit more how you solved this? Thanks

@bradzo
Copy link

bradzo commented Mar 19, 2017

Hi @cunneen and @maxcabrera

I just changed the install path to /home/ubuntu/pm2-meteor and then had no issue with permissions.
I'm using an AWS EC2 Ubuntu 14.04 instance.

Not really sure why it has to go into /opt anyway - obviously, that's "the way it is" or "that's where user apps live" in Ubuntu, but for a Meteor app, I see no problem with putting it in /home/ubuntu ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants