FS#66425 - dhcpcd fails ro write leases due to wrong path in chroot

Attached to Project: Arch Linux
Opened by Daniel Albers (al) - Sunday, 26 April 2020, 13:08 GMT
Last edited by Antonio Rojas (arojas) - Sunday, 26 April 2020, 13:14 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
dhcpcd fails to store leases.

Additional info:
* package version(s)
dhcpcd 9.0.2-1

* config and/or log files etc.
dhcpcd[100391]: nm-bond: leased 192.168.20.34 for 2419200 seconds
dhcpcd[100391]: write_lease: /var/lib/dhcpcd/nm-bond.lease: Permission denied

* link to upstream bug report, if any

Steps to reproduce:
* Upgrade dhcpcd from ??
* Configure NetworkManager to use dhcpcd
cat << '' > /etc/NetworkManager/conf.d/dhcp.conf
[main]
dhcp=dhcpcd

* Observe that DHCP interface amasses IPs:

inet 192.168.20.15/24 brd 192.168.20.255 scope global secondary dynamic noprefixroute nm-bond
valid_lft 2293671sec preferred_lft 1991271sec
inet 192.168.20.16/24 brd 192.168.20.255 scope global secondary dynamic noprefixroute nm-bond
valid_lft 2293752sec preferred_lft 1991352sec
inet 192.168.20.17/24 brd 192.168.20.255 scope global secondary dynamic noprefixroute nm-bond
valid_lft 2295189sec preferred_lft 1992789sec

* dhcpcd reports "write_lease: /var/lib/dhcpcd/nm-bond.lease: Permission denied"
* Permissions for /var/lib/dhcpcd/nm-bond.lease are fine, but it does a chroot(/var/lib/dhcpcd) first and actually tries to access /var/lib/dhcpcd/var/lib/dhcpcd/nm-bond.lease, but the directory has permissions rwxr-xr-x root:root.
* Workaround:
chmod 700 /var/lib/dhcpcd/var/lib/dhcpcd
chown dhcpcd:dhcpcd /var/lib/dhcpcd/var/lib/dhcpcd
This task depends upon

Closed by  Antonio Rojas (arojas)
Sunday, 26 April 2020, 13:14 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#66231 

Loading...