strongloop / strong-pm

deployer for node applications
http://strong-pm.io
Other
1k stars 71 forks source link

Permission error when deploy app #317

Closed Lunigorn closed 8 years ago

Lunigorn commented 8 years ago

I get app from here, then make docker container like here, then deploy app like here.

then I get error:

Untar /tmp/strong-pm-1-1455648088693/application.tgz failed with: Error: EACCES, open '/home/strong-pm/svc/1/work/d627305e429a0e04810d241d3a136170c15a948d.1455648088724/.eslintignore'
Failed to deploy `..\express-example-app-1.0.2.tgz` as `express-example-app` to `http://192.168.1.36:8701/` via `http://192.168.1.36:8701/`

How to solve this problem?

cleever commented 8 years ago

Same here.

gggin commented 8 years ago

Same here

rmg commented 8 years ago

@cleever @gggin are you both also deploying from Windows, Docker, and using a tarball created by slc build?

cleever commented 8 years ago

@rmg. Yes. First of all, I ran 'slc build', to create a tar.gz file.

(Windows Enviroment to Ubuntu)

gggin commented 8 years ago

Windows Enviroment to Ubuntu same no docker! I'm a beginner I just use GUI(web page)

brianxcli commented 8 years ago

win -> ubuntu, not docker. Application.tgz built by slc build or arc gui.

rmg commented 8 years ago

Can you also all give the output of slc version on your workstations?

And the output from sl-pm --version (or slc version) on your servers?

gggin commented 8 years ago

image

image

brianxcli commented 8 years ago

The reason is that application.tgz built on Win is not assigned a proper permission and fails to be extracted on Ubuntu. I've found a temporary solution.

First, go to path-to-npm/node_modules/strongloop/node_modules/strong-pack/index.js, add a new option key to the pack() method like: strong-pack

This key is used when parsing the tar options.

Then go to path-to-npm/node_modules/strongloop/node_modules/tar-fs/index.js, find exports.pack method, and utilize the options we add in step 1 and assign a proper permission, as a linux convention, 744 for folders and 644 for files. tar-fs

Again this is only a temporary solution for deploying app from win to strong-pm running on Ubuntu.

rmg commented 8 years ago

Great sleuthing, @XiaochenLi1984!

cleever commented 8 years ago

Thanks @rmg and @XiaochenLi1984 !

rmg commented 8 years ago

@Lunigorn @gggin @cleever @XiaochenLi1984 sorry for the auto-close.

I've released strong-pack v1.0.1 which should fix this. It's a nested dependency of strong-build, so the best way to get it will be to run npm install -g strongloop on your Windows machines.

After that, slc build should work properly from Windows and allow you to deploy the generated tarballs to strong-pm.

@Lunigorn would you please close if this works for you or comment if it does not?

brianxcli commented 8 years ago

@rmg Thanks, it works on my Windows.

Lunigorn commented 8 years ago

@rmg Thanks, it works.

gggin commented 8 years ago

@rmg Thanks, so great!