coollabsio / coolify

An open-source & self-hostable Heroku / Netlify / Vercel alternative.
https://coolify.io
Apache License 2.0
34.39k stars 1.87k forks source link

[Bug]: Installation script does EUID check after trying to create rootfs directories #4152

Open Bilge opened 1 week ago

Bilge commented 1 week ago

Error Message and Logs

$ curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
mkdir: cannot create directory ‘/data’: Permission denied
mkdir: cannot create directory ‘/data’: Permission denied
mkdir: cannot create directory ‘/data’: Permission denied
mkdir: cannot create directory ‘/data’: Permission denied
mkdir: cannot create directory ‘/data’: Permission denied
mkdir: cannot create directory ‘/data’: Permission denied
mkdir: cannot create directory ‘/data’: Permission denied
mkdir: cannot create directory ‘/data’: Permission denied
mkdir: cannot create directory ‘/data’: Permission denied
curl: (23) Failed writing body (952 != 10156)

Steps to Reproduce

  1. curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash

Example Repository URL

No response

Coolify Version

Doesn't even install lol

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 20.04.3 LTS

Additional Information

The script actually does a EUID check later on, after it has already tried doing operations that require being root (namely: mkdir), which is pretty dumb.

itunza commented 6 days ago

having the same issue, fresh ubuntu 22.04 install mkdir: cannot create directory ‘/data’: Permission denied

Bilge commented 6 days ago

You have to run curl -fsSL https://cdn.coollabs.io/coolify/install.sh | sudo bash.

Keep in mind this is going to give Coolify root access to your system, not just while the install script is running, but forever after, since it installs an SSH key under the root user (lol).

itunza commented 6 days ago

i think we have to run it as a sudo user