Snap application requires root privileges

Bug #1576716 reported by Ilija Ćosić
This bug report is a duplicate of:  Bug #1595558: sudo doesn't have /snap/bin in PATH. Edit Remove
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

When using nmap that is installed via Snap it is impossible to give it root privileges which are required for the application to work.

The error output:

(without sudo)
nmap -sS 192.168.0.1/24
You requested a scan type which requires root privileges.
QUITTING!

(with sudo)
sudo nmap -sS 192.168.0.1/24
sudo: nmap: command not found

Description: Ubuntu 16.04 LTS
Release: 16.04

snap list
Name Version Developer
nmap 7.12SVN-0.4 joetalbott
ubuntu-core 16.04+20160419.20-55 canonical

Tags: xenial
affects: unity (Ubuntu) → snap (Ubuntu)
tags: added: xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in snap (Ubuntu):
status: New → Confirmed
Revision history for this message
cl-netbox (cl-netbox) wrote :

I contacted the developer and now the problem is solved. Joe Talbot fixed the issue and uploaded the new version 7.12SVN-05 (26). Upgrade the snap package : sudo snap refresh nmap - then execute : sudo snap connect nmap:network-control ubuntu-core:network-control - now you can run nmap as root. Thank you Joe ! :)

Revision history for this message
cl-netbox (cl-netbox) wrote :

Update : nmap can not be run with root privileges from a standard user account, it has to be run as root user (sudo -i) - I informed Joe Talbott about this circumstance.

Revision history for this message
Joe Talbott (joetalbott) wrote :

You can run nmap via:

   sudo /snap/bin/nmap ...

or

   sudo -s
   # /snap/bin/nmap ...

or

   sudo -i
   # /snap/bin/nmap ...

This seems to only affect Ubuntu Classic images where root's PATH does not include /snap/bin On a Snappy Ubuntu Core image root does have /snap/bin/ in PATH.

Changed in snap (Ubuntu):
importance: Undecided → High
importance: High → Medium
affects: snap (Ubuntu) → snapd (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.