man -l local-file fails with Access Denied
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
man-db (Ubuntu) |
Triaged
|
High
|
Unassigned |
Bug Description
I use dh_installman to install man pages in a debian package. This fails on bionic, but succeeds in artful.
In bionic (version man-db 2.8.3-2)
dh_installman --verbose
install -p -m0644 ./debian/
install -p -m0644 ./debian/
install -p -m0644 ./debian/
install -p -m0644 ./debian/
install -p -m0644 ./debian/
man -l --recode UTF-8 ./debian/
man: can't open ./debian/
dh_installman: man -l --recode UTF-8 ./debian/
dh_installman: Aborting due to earlier error
man -l <relative filename> always fails, also when executed manually. I can "cat" the indicated manfile without any problem. I also executed the man -l command in strace and found this:
19540 lstat("
19540 stat(".
The same command with --debug option:
man -l --recode UTF-8 --debug ./debian/
ruid=1000, euid=1000
rgid=1000, egid=1000
++priv_drop_count = 1
From the config file /etc/manpath.
Mandatory mandir `/usr/man'.
Mandatory mandir `/usr/share/man'.
Mandatory mandir `/usr/local/
Path `/bin' mapped to mandir `/usr/share/man'.
Path `/usr/bin' mapped to mandir `/usr/share/man'.
Path `/sbin' mapped to mandir `/usr/share/man'.
Path `/usr/sbin' mapped to mandir `/usr/share/man'.
Path `/usr/local/bin' mapped to mandir `/usr/local/man'.
Path `/usr/local/bin' mapped to mandir `/usr/local/
Path `/usr/local/sbin' mapped to mandir `/usr/local/man'.
Path `/usr/local/sbin' mapped to mandir `/usr/local/
Path `/usr/X11R6/bin' mapped to mandir `/usr/X11R6/man'.
Path `/usr/bin/X11' mapped to mandir `/usr/X11R6/man'.
Path `/usr/games' mapped to mandir `/usr/share/man'.
Path `/opt/bin' mapped to mandir `/opt/man'.
Path `/opt/sbin' mapped to mandir `/opt/man'.
Global mandir `/usr/man', catdir `/var/cache/
Global mandir `/usr/share/man', catdir `/var/cache/man'.
Global mandir `/usr/local/man', catdir `/var/cache/
Global mandir `/usr/local/
Global mandir `/usr/X11R6/man', catdir `/var/cache/
Global mandir `/opt/man', catdir `/var/cache/
Added section `1'.
Added section `n'.
Added section `l'.
Added section `8'.
Added section `3'.
Added section `2'.
Added section `3posix'.
Added section `3pm'.
Added section `3perl'.
Added section `3am'.
Added section `5'.
Added section `4'.
Added section `9'.
Added section `6'.
Added section `7'.
`/usr/man' `' `1'
`/usr/share/man' `' `1'
`/usr/local/
`/bin' `/usr/share/man' `0'
`/usr/bin' `/usr/share/man' `0'
`/sbin' `/usr/share/man' `0'
`/usr/sbin' `/usr/share/man' `0'
`/usr/local/bin' `/usr/local/man' `0'
`/usr/local/bin' `/usr/local/
`/usr/local/sbin' `/usr/local/man' `0'
`/usr/local/sbin' `/usr/local/
`/usr/X11R6/bin' `/usr/X11R6/man' `0'
`/usr/bin/X11' `/usr/X11R6/man' `0'
`/usr/games' `/usr/share/man' `0'
`/opt/bin' `/opt/man' `0'
`/opt/sbin' `/opt/man' `0'
`/usr/man' `/var/cache/
`/usr/share/man' `/var/cache/man' `-1'
`/usr/local/man' `/var/cache/
`/usr/local/
`/usr/X11R6/man' `/var/cache/
`/opt/man' `/var/cache/
`1' `' `-5'
`n' `' `-5'
`l' `' `-5'
`8' `' `-5'
`3' `' `-5'
`2' `' `-5'
`3posix' `' `-5'
`3pm' `' `-5'
`3perl' `' `-5'
`3am' `' `-5'
`5' `' `-5'
`4' `' `-5'
`9' `' `-5'
`6' `' `-5'
`7' `' `-5'
is a tty
real user = 1000; effective user = 1000
using pager as pager
path directory /usr/local/sbin is in the config file
adding /usr/local/man to manpath
adding /usr/local/
path directory /usr/local/bin is in the config file
/usr/local/man is already in the manpath
/usr/local/
path directory /usr/sbin is in the config file
adding /usr/share/man to manpath
path directory /usr/bin is in the config file
/usr/share/man is already in the manpath
path directory /sbin is in the config file
/usr/share/man is already in the manpath
path directory /bin is in the config file
/usr/share/man is already in the manpath
path directory /usr/games is in the config file
/usr/share/man is already in the manpath
path directory /usr/local/games is not in the config file
but does have a ../man, man, ../share/man, or share/man subdirectory
/usr/local/man is already in the manpath
path directory /snap/bin is not in the config file
and doesn't have ../man, man, ../share/man, or share/man subdirectories
adding mandatory man directories
waarschuwing: /usr/man: Bestand of map bestaat niet
/usr/share/man is already in the manpath
/usr/local/
add_nls_manpaths(): processing /usr/local/
checking for locale nl_BE.UTF-8
manpath search path (with duplicates) = /usr/share/
adding /usr/share/man/nl to manpathlist
adding /usr/local/man to manpathlist
adding /usr/local/
adding /usr/share/man to manpathlist
Removing duplicate manpath entry /usr/local/
final search path = /usr/share/
++priv_drop_count = 2
man: ./debian/
frank@panter:
In artful (version man-db 2.7.6.1-2):
dh_installman --verbose
install -p -m0644 ./debian/
install -p -m0644 ./debian/
install -p -m0644 ./debian/
install -p -m0644 ./debian/
install -p -m0644 ./debian/
man -l --recode UTF-8 ./debian/
mv debian/
man -l --recode UTF-8 ./debian/
mv debian/
man -l --recode UTF-8 ./debian/
mv debian/
man -l --recode UTF-8 ./debian/
mv debian/
man -l --recode UTF-8 ./debian/
mv debian/
chmod 0644 -- debian/
My release: lsb_release -rd
Description: Ubuntu 18.04 LTS
Release: 18.04
Is your home directory on NFS? I am getting the exact same issue. Output of dmesg:
``` 7.910:1582) : apparmor="DENIED" operation="sendmsg" profile= "/usr/bin/ man" pid=5981 comm="man" laddr=<redacted> lport=744 faddr=<redacted> fport=2049 family="inet" sock_type="stream" protocol=6 requested_ mask="send" denied_mask="send"
[4399566.994763] audit: type=1400 audit(153796748
[4399566.995173] nfs: RPC call returned error 13
Looks like an AppArmor config issue.