[SOLVED] UFW error

Hi!

Just installed Netrunner on my PC and then installed UFW amongst other necessities. Then I did

sudo systemctl enable ufw
sudo systemctl start ufw
sudo ufw enable
sudo ufw status

which spat this out:

WARN: uid is 0 but ‘/’ is owned by 1000
WARN: / is group writable!

I Googled this and in one forum they mentioned the need of a new kernel??

Hmmm… now I installed the BZR version, and I just got a different error…

Traceback (most recent call last):
File “/usr/bin/ufw”, line 26, in
import ufw.frontend
File “/usr/lib/python2.7/site-packages/ufw/frontend.py”, line 22, in
from ufw.common import UFWError
ValueError: bad marshal data (unknown type code)

That’s a permissions issue both / and /etc directories should be owned by root.

Open a terminal and run ls -l /
All of the directories under / should be owned by root root like in the screen shot:
[attachment=448]

Next make note of anything different and chown them to root.root like this

sudo chown root.root / /etc

That seems to no be the problem. This is my output:

$ ls -l
totalt 92
drwxr-xr-x 6 root root 4096 02.06.2014 12:44 boot/
drwxr-xr-x 19 root root 3300 09.10.2014 21:46 dev/
drwxr-xr-x 95 root root 12288 10.10.2014 00:05 etc/
drwxr-xr-x 3 root root 4096 09.10.2014 21:30 home/
drwx------ 2 root root 16384 09.10.2014 21:26 lost+found/
drwxr-xr-x 2 root root 4096 17.05.2013 12:32 media/
drwxr-xr-x 2 root root 4096 03.06.2013 17:51 mnt/
drwxr-xr-x 3 root root 4096 09.10.2014 21:30 opt/
dr-xr-xr-x 207 root root 0 09.10.2014 21:42 proc/
drwxr-xr-x 12 root root 4096 09.10.2014 21:37 root/
drwxr-xr-x 26 root root 740 09.10.2014 22:08 run/
drwxr-xr-x 4 root root 4096 03.06.2013 17:51 srv/
dr-xr-xr-x 13 root root 0 09.10.2014 21:42 sys/
drwxrwxrwt 16 root root 540 10.10.2014 00:13 tmp/
drwxr-xr-x 10 root root 4096 09.10.2014 21:31 usr/
drwxr-xr-x 12 root root 4096 09.10.2014 21:31 var/
lrwxrwxrwx 1 root root 7 12.07.2014 11:57 bin -> usr/bin/
lrwxrwxrwx 1 root root 20 08.09.2014 10:18 default -> /usr/lib/jvm/default/
-rw-r–r-- 1 root root 18752 23.02.2014 11:46 kde-image-pkgs.txt
lrwxrwxrwx 1 root root 7 12.07.2014 11:57 lib -> usr/lib/
lrwxrwxrwx 1 root root 7 12.07.2014 11:57 lib64 -> usr/lib/
-rw-r–r-- 1 root root 4694 08.04.2014 10:52 root-image-pkgs.txt
lrwxrwxrwx 1 root root 7 12.07.2014 11:57 sbin -> usr/bin/

Everything under /etc should also be owned by root root as well except for cups it should be owned by root lp like in this screenshot:
[attachment=450]

This is also OK :confused:

Here is /etc for ufw
[attachment=453]

Here is /etc/ufw
[attachment=454]

If anything is not root.root as it should be then sudo chmod it…

I think that gufw may be what changed your permissions, but I can’t be sure I don’t use it.
May I suggest kcm-ufw from the AUR instead of gufw , this is what I use and I get a much better experience.

yaourt -S kcm-ufw

Hahh! I was stupid enough not to run your code :slight_smile:

sudo chown root.root / /etc

That one took care of the first error :slight_smile:

Now I am left with

WARN: / is group writable!
[hr]

Hmm… No, I just installed

ufw, bash, inkscape, scribus-svn and qupzilla on a brand new fresh install… so if not any of those apps mess with ownership, it must be there from the start somehow

Here this should make / unwritable again.

sudo chmod g-w /

Thanks! That solved it :slight_smile:

I just did a fresh install of ufw and didn’t get the error you did.

I meant a fresh Netrunner install :slight_smile: One of the first things I installed was ufw - so chances are that the problem could have been there from the start…

Yes, I understood. This is a fresh install on my test machine that I use for troubleshooting. What I did was install UFW on a fresh install of Netrunner Rolling and didn’t get the issue. This is when I began troubleshooting with you here in the forums.

Aha! OK :slight_smile: I installed Netrunner on my laptop also now (I like it (y) ) and the same thing happens with UFW here too… but, now I know how to fix it