Closed jakoberpf closed 1 year ago
Digging and found: https://github.com/mosajjal/sniproxy/blob/160a31ec80e4bc302ada7c7fa0cb8876c87f638f/main.go#L344
Sniproxy tries to generate some certs but fails
As the log indicates there are missing permission writing to /tmp . Are you using rootless-docker or podman?
Not intentionally. I am setting up docker in my cloud init script like so...
#cloud-config
users:
- name: automation
groups: users, admin
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
ssh_authorized_keys:
- ${public_ssh_key}
package_update: true
package_upgrade: true
packages:
- fail2ban
- ufw
runcmd:
- printf "[sshd]\nenabled = true\nbanaction = iptables-multiport" > /etc/fail2ban/jail.local
- systemctl enable fail2ban
- systemctl start fail2ban
- ufw allow OpenSSH
- ufw allow http
- ufw allow https
- ufw allow 53
- ufw enable
- sed -ie '/^PermitRootLogin/s/^.*$/PermitRootLogin no/' /etc/ssh/sshd_config
- sed -ie '/^PasswordAuthentication/s/^.*$/PasswordAuthentication no/' /etc/ssh/sshd_config
- sed -ie '/^X11Forwarding/s/^.*$/X11Forwarding no/' /etc/ssh/sshd_config
- sed -ie '/^#MaxAuthTries/s/^.*$/MaxAuthTries 2/' /etc/ssh/sshd_config
- sed -ie '/^#AllowTcpForwarding/s/^.*$/AllowTcpForwarding no/' /etc/ssh/sshd_config
- sed -ie '/^#AllowAgentForwarding/s/^.*$/AllowAgentForwarding no/' /etc/ssh/sshd_config
- sed -ie '/^#AuthorizedKeysFile/s/^.*$/AuthorizedKeysFile .ssh/authorized_keys/' /etc/ssh/sshd_config
- sed -i '$a AllowUsers automation' /etc/ssh/sshd_config
- systemctl restart ssh
- apt update && apt install apt-transport-https ca-certificates curl software-properties-common -y
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
- echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
- apt update && apt install docker-ce docker-compose -y
- usermod -aG docker automation
And then startup docker-compose via the automation user and sudo docker-compose up -d
. I didn't think that I would run rootless then?
hm looks like a normal docker installation. sorry no idea why you get this permission error. spawn a shell inside the container, then you can test a bit. as a workaround you can probably map /tmp to a local volume.
After a couple of tries, tearing down the machine and recreating it started working. But I actually have no Idea why it suddenly did. Thanks for the help.
Closing this...
This is a very interesting project. I started this up on a vanilla Ubuntu on Hetzner with a quite vanilla config, but am getting this error which I fail to unterstand.
Any Ideas why I see this issue?