Unable to do nsswitch resolution on Avahi due to permissions issue

Bug #1676476 reported by Ken D'Ambrosio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
avahi (Ubuntu)
New
Undecided
Unassigned

Bug Description

I set up Avahi on two 16.04 systems, but was unable to resolve between them via ping; note, however, that avahi-resolve worked fine:

root@clients-1:~# avahi-resolve -n -4 kentest.local
kentest.local 192.168.243.16 # This is a good thing

These, not so much good:
root@clients-1:~# ping kentest.local
ping: unknown host kentest.local

My nsswitch.conf file was thus:
hosts: files mdns4_minimal [NOTFOUND=return] dns

I did a strace on the ping, and saw this:
sun_path="/var/run/avahi-daemon/socket"}, 110) = -1 EACCES (Permission denied)

The socket's permissions were fine, so I looked at the directory the socket was in and saw:
root@clients-1:~# ls -ald /var/run/avahi-daemon/
drwx------ 2 avahi avahi 80 Mar 27 05:35 /var/run/avahi-daemon/

It seemed to me this should have been okay -- I mean, I was trying the ping as root, and presumably user avahi would be servicing the request if it wasn't user root. But "Permission denied" is "permission denied," so I changed directory permissions and tried again:

root@clients-1:~# chmod 777 /var/run/avahi-daemon/
root@clients-1:~# ping kentest.local
PING kentest.local (192.168.243.16) 56(84) bytes of data.
64 bytes from 192.168.243.16: icmp_seq=1 ttl=64 time=1.31 ms
64 bytes from 192.168.243.16: icmp_seq=2 ttl=64 time=0.742 ms

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: avahi-daemon 0.6.32~rc+dfsg-1ubuntu2
ProcVersionSignature: Ubuntu 4.4.0-66.87-generic 4.4.44
Uname: Linux 4.4.0-66-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
Date: Mon Mar 27 14:55:01 2017
Ec2AMI: ami-00000004
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: GB.small
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
ProcEnviron:
 TERM=xterm
 SHELL=/bin/bash
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 XDG_RUNTIME_DIR=<set>
SourcePackage: avahi
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Ken D'Ambrosio (ken-jots) wrote :
Revision history for this message
Ken D'Ambrosio (ken-jots) wrote :

Note that this bug report should be filed against package avahi-daemon, and not avahi, since avahi, itself, isn't even a package, but the Launcpad form wouldn't let me submit it as such.

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.