1

When I run sudo ufw enable in the terminal, it says that it is enabled and warns me about /lib being owned by 1000. Here is the output...

WARN: uid is 0 but '/lib' is owned by 1000
WARN: /lib is group writable!
Firewall is active and enabled on system startup

I tried "ls -l /" and here is the output

drwxr-xr-x   2 root   root   4096 Aug  2 13:34 bin
drwxr-xr-x   3 root   root   4096 Aug  4 15:23 boot
drwxr-xr-x   3 root   root   4096 Feb 11  2016 boot.bak
drwxr-xr-x  14 root   root   3460 Aug  6 13:32 dev
drwxr-xr-x 229 root   root   4096 Aug  8 12:55 etc
drwxr-xr-x   4 root   root   4096 Feb 11  2016 home
drwxrwxr-x  37 myname myname 4096 Aug  4 12:54 lib
drwx------   2 root   root      3 Feb 11  2017 lost+found
drwxr-xr-x   3 root   root   4096 Aug  2 14:35 media
drwxr-xr-x   2 root   root      3 Feb 11  2017 mnt
drwxr-xr-x   6 root   root   4096 Aug  4 13:42 opt
dr-xr-xr-x 179 root   root      0 Jan  1  1970 proc
drwx------   6 root   root   4096 Aug  8 12:15 root
drwxr-xr-x  25 root   root    880 Aug  8 13:00 run
drwxr-xr-x   2 root   root   4096 Aug  4 12:54 sbin
drwxr-xr-x   2 root   root   4096 Aug  2 13:50 snap
drwxr-xr-x   2 root   root      3 Feb 11  2017 srv
dr-xr-xr-x  12 root   root      0 Aug  8 13:10 sys
drwxrwxrwt  14 root   root   4096 Aug  8 13:20 tmp
drwxr-xr-x  17 root   root   4096 Aug  2 13:29 usr
drwxr-xr-x  22 root   root   4096 Aug  2 13:50 var

What should I do?

1 Answers1

1

I do not use Ubuntu on a Raspberry Pi but on Debian and on Raspbian the /lib directory has this modes:

rpi ~$ ls -ld /lib
drwxr-xr-x 11 root root 4096 Aug  7 22:34 /lib

Ubuntu is a Debian derivate like Raspbian so it should have the same modes. You can correct it with this commands:

rpi ~$ sudo chmod 755 /lib
rpi ~$ sudo chown root:root /lib
Ingo
  • 42,097
  • 20
  • 85
  • 197