atsign-foundation / noports

Connect to any device with no external listening ports open
https://noports.com
BSD 3-Clause "New" or "Revised" License
265 stars 15 forks source link

When running `sudo sh universal.sh` the installer creates $HOME/.local owned by root:root #1013

Closed cpswan closed 3 months ago

cpswan commented 4 months ago

Describe the bug

On a fairly vanilla Ubuntu 24.04 VM I'm using for testing (after running sudo sh universal.sh:

total 92
drwxr-x--- 9 ubuntu ubuntu  4096 Apr 30 13:16 .
drwxr-xr-x 3 root   root    4096 Apr 29 17:16 ..
drwxr-xr-x 3 ubuntu ubuntu  4096 Apr 29 16:20 .atsign
-rw------- 1 ubuntu ubuntu   977 Apr 29 18:31 .bash_history
-rw-r--r-- 1 ubuntu ubuntu   220 Mar 31 08:41 .bash_logout
-rw-r--r-- 1 ubuntu ubuntu  3771 Mar 31 08:41 .bashrc
drwx------ 2 ubuntu ubuntu  4096 Apr 29 16:19 .cache
drwxr-xr-x 3 root   root    4096 Apr 30 13:07 .local
-rw-r--r-- 1 ubuntu ubuntu   807 Mar 31 08:41 .profile
drwx------ 2 ubuntu ubuntu  4096 Apr 30 13:06 .ssh
drwx------ 2 ubuntu ubuntu  4096 Apr 30 12:34 .ssh_w_auth
drwx------ 2 ubuntu ubuntu  4096 Apr 30 12:33 .ssh_w_keys
drwxr-xr-x 3 ubuntu ubuntu  4096 Apr 29 17:13 .sshnp
-rw-r--r-- 1 ubuntu ubuntu     0 Apr 29 16:20 .sudo_as_admin_successful
-rw------- 1 ubuntu ubuntu 12593 Apr 30 12:53 .viminfo
-rw-rw-r-- 1 ubuntu ubuntu   165 Apr 29 16:20 .wget-hsts
-rw-rw-r-- 1 ubuntu ubuntu 19090 Apr 26 14:18 universal.sh

Steps to reproduce

  1. First I install a fresh VM from a cloud image
  2. Then I log into it and download universal.sh
  3. And then I run sudo sh universal.sh

Expected behavior

File in $HOME should generally belong to $USER:$USER

Additional context

Looking through universal.sh I think this is happening in install.sh