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

Deploying Phoenix with non-root User Fails :-\ #11

Open
nelsonic opened this issue Jun 30, 2017 · 6 comments
Open

Deploying Phoenix with non-root User Fails :-\ #11

nelsonic opened this issue Jun 30, 2017 · 6 comments
Labels

Comments

@nelsonic
Copy link
Member

When dependencies are installed with sudo on an instance they are not accessible to the non-root we are having this issue with HL and the ODBC dependencies ...

I'm investigating our options.

@nelsonic nelsonic added the chore label Jun 30, 2017
@nelsonic
Copy link
Member Author

@nelsonic
Copy link
Member Author

Simply adding a password for root is not enough for Ubuntu 14.04 Server.

You also need to edit /etc/ssh/sshd_config, and comment out the following line:

PermitRootLogin without-password

Just below it, add the following line:

PermitRootLogin yes

Then restart SSH:

service ssh restart

for Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-59-generic x86_64) "PermitRootLogin without-password" has been replaced by "PermitRootLogin prohibit-password"

@nelsonic
Copy link
Member Author

root@HLockerstaging2:~/.ssh# cat authorized_keys
no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command="echo 'Please login as the user \"hladmin\" rather than the user \"root\".';echo;sleep 10" ssh-rsa {MY_SSH_PUBLIC_KEY}

@nelsonic
Copy link
Member Author

removed the command before the SSH Key from /root/.ssh/authorized_keys and now it totes works.

@nelsonic
Copy link
Member Author

** (Mix) Cannot execute task because the project was not yet compiled. When build_embedded is set to true, "MIX_ENV=prod mix compile" must be explicitly executed

I'm now reading through the edeliver wiki: https://github.com/edeliver/edeliver/wiki

@nelsonic
Copy link
Member Author

Running the app in "production" mode works!!

MIX_ENV=prod mix compile
MIX_ENV=prod mix phoenix.server

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

No branches or pull requests

1 participant