KiraCore / testnet

public testnet coordination
Other
31 stars 28 forks source link

Run as root #1

Closed CrazySerGo closed 3 years ago

CrazySerGo commented 3 years ago

Dear Team, Could you avoid running node with root account, please? It's a bad practice to use root + many issues may be missed as root account has highest privileges. If you plan to catch such issues in production or run production node also with root, you can close this incident.

As example I run it as non root user and what I have:

`$ cd tmp && read -p "Input branch name: " BRANCH && \

wget https://raw.githubusercontent.com/KiraCore/kira/$BRANCH/workstation/init.sh -O ./i.sh && \ chmod 555 -v ./i.sh && H=$(sha256sum ./i.sh | awk '{ print $1 }') && read -p "Is '$H' a [V]alid SHA256 ?: "$'\n' -n 1 V && \ [ "${V,,}" == "v" ] && ./i.sh "$BRANCH" || echo "ERROR: Setup failed or was cancelled by the user. Try again init command." Input branch name: testnet-1 --2021-04-01 18:20:52-- https://raw.githubusercontent.com/KiraCore/kira/testnet-1/workstation/init.sh Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.110.133, 185.199.111.133, ... Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 17068 (17K) [text/plain] Saving to: ‘./i.sh’

./i.sh 100%[=============================================================================>] 16.67K --.-KB/s in 0.001s

2021-04-01 18:20:52 (21.6 MB/s) - ‘./i.sh’ saved [17068/17068]

mode of './i.sh' changed from 0664 (rw-rw-r--) to 0555 (r-xr-xr-x) Is '26237215b968ecfd201d92c61a13b4c4ce84aa65d57465fe949b2b49f8e66db0' a [V]alid SHA256 ?: vchmod: changing permissions of '/etc/profile': Operation not permitted

STARTED: INIT v0.0.9
SKIP UPDATE: false
START TIME: 1617294055
INFRA BRANCH: testnet-1
INFRA REPO: https://github.com/KiraCore/kira
KIRA USER: root
ARCHITECTURE: x86_64

mkdir: cannot create directory ‘/home/root’: Permission denied mkdir: cannot create directory ‘/home/root’: Permission denied mkdir: cannot create directory ‘/home/root’: Permission denied mkdir: cannot create directory ‘/home/root’: Permission denied INFO: Initalizing setup script...

++ cat /proc/cpuinfo ++ grep processor ++ wc -l

asmodat commented 3 years ago

root is required in the current version to enable modification of firewall settings, docker, systemd services, file access privileges and and more