atsign-foundation / noports

Connect to any device with no external listening ports open

Home Page:https://noports.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bug (universal.sh): root owned .ssh and .local directories

XavierChanth opened this issue · comments

I'm really not sure how this happened, running fedora 40 with the systemd install.

Setup sshnpd first, then realized I didn't have openssh-server installed so I went back and added it to the machine.

image

Both .local/ and .ssh/ were owned by root. We also had a similar issue with .sshnp earlier today.

I'm thinking we should add a step to universal.sh which executes mkdir -p <dir> on all directories we use (.atsign, .local/bin, .sshnp, .ssh) at the beginning, and then chown -R user:user <dir> | chown -R user <dir> towards the end of installation.

I just did a device install using 5.3.0 universal.sh onto a freshly installed (default) Fedora 40 Server:

image

.ssh is certainly a problem. In my case .local is as expected.

Looks like the problematic piece is in install.sh rather than universal.sh:

# SETUP AUTHORIZED KEYS #

setup_authorized_keys() {
  mkdir -p "$user_ssh_dir"
  touch "$user_ssh_dir/authorized_keys"
  chown $user:$user "$user_ssh_dir/authorized_keys"
  chmod 644 "$user_ssh_dir/authorized_keys"
}

was this closed in #1153 ? @XavierChanth

was this closed in #1153 ? @XavierChanth

Should be