ufw

Comment 1 for bug 1808463

Revision history for this message
Jamie Strandboge (jdstrand) wrote : Re: ERROR: problem running ufw-init Could not find /lib/ufw/ufw-init-functions (aborting)

Thank you for filing a bug. I'm unable to reproduce:

$ sudo dpkg -l|grep ufw

$ sudo iptables -L -n
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

$ sudo snap install ufw
ufw 0.36rc from Canonical✓ installed

$ sudo ufw enable
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
Firewall is active and enabled on system startup
jamie@server:~$ snap info ufw
name: ufw
summary: ufw - Uncomplicated Firewall
publisher: Canonical✓
contact: https://bugs.launchpad.net/ufw/+filebug
license: unset
description: |
  ufw is a program for managing a netfilter firewall and aims to provide an easy
  to use experience for the user.
commands:
  - ufw.conntrack
  - ufw.doc
  - ufw.init
  - ufw.ipset
  - ufw
services:
  ufw.srv: oneshot, enabled, inactive
snap-id: Jb8klqgs5djfejP5egB9Za8KYVK686Pe
tracking: stable
refresh-date: today at 08:49 CST
channels:
  stable: 0.36rc (120) 737kB -
  candidate: 0.36rc (120) 737kB -
  beta: 0.36rc (95) 733kB -
  edge: 0.36rc (200) 737kB -
installed: 0.36rc (120) 737kB -

The snap should never be looking for /lib/ufw/ufw-init-functions because we are specifying --rootdir and --datadir in /snap/ufw/current/bin/cli, which is what is invoked by /snap/bin/ufw.

Can you retry your reproducer, ideally as a separate user, to see if you are seeing it? If so, can you provide more details on your environment and anything you might have done to make snaps work in general, etc? If as a separate user you don't see it, but as your user you do, can you examine any shell aliases, local-to-your-user wrapper commands or your shell's environment to try to determine the cause?