Results 1 to 7 of 7

Thread: dhclient error

  1. #1
    Join Date
    Nov 2006
    Beans
    124
    Distro
    Ubuntu 12.04 Precise Pangolin

    dhclient error

    Hi!
    I have started to read server logs, and find a lot of following error:
    dhclient: can't create /var/lib/dhcp3/dhclient.eth0.leases: Permission denied

    What does it mean, and how to fix it?

  2. #2
    Join Date
    Apr 2008
    Location
    Germany - Berlin
    Beans
    340

    Re: dhclient error

    It means that you don't have permission to write the file dhclient.eth0.leases in the directory /var/lib/dhcp3/ .
    Did you execute 'sudo dhclient' or just 'dhclient'? You sould have root priviliges if you run this command.

  3. #3
    Join Date
    Nov 2006
    Beans
    124
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: dhclient error

    Quote Originally Posted by Gunman1982 View Post
    It means that you don't have permission to write the file dhclient.eth0.leases in the directory /var/lib/dhcp3/ .
    Did you execute 'sudo dhclient' or just 'dhclient'? You sould have root priviliges if you run this command.

    ok, I haven't stated question clearly, my bad.
    I do not execute this command, I found it in sys.log that is why I'm wondering which process is trying to execute and why doesn't it have right permissions?

  4. #4
    Join Date
    May 2008
    Location
    Melbourne, Australia
    Beans
    157

    Re: dhclient error

    Can you show us a full listing of /var/lib/dhcp3 with ls -la?

    Mine, for example is:


    Code:
    drwxr-xr-x  2 root root 4096 2008-03-01 19:20 .
    drwxr-xr-x 61 root root 4096 2008-05-03 07:45 ..
    -rw-r--r--  1 dhcp root  577 2007-07-31 18:32 dhclient.eth0.leases
    -rw-r--r--  1 root root    0 2008-03-01 19:20 dhclient.leases
    -rw-r--r--  1 dhcp root 9248 2008-05-26 21:20 dhclient.wlan0.leases
    As you can see, my leases files are owned by the dhcp user. The directory is owned by root, so it might be that if your directory is empty, then dhclient isn't able to write to it.

    I suggest the following:

    touch /var/lib/dhcp3/dhclieht.eth0.leases
    chown dhcp /var/lib/dhcp3/dhclieht.eth0.leases

  5. #5
    Join Date
    Nov 2006
    Beans
    124
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: dhclient error

    Quote Originally Posted by pdwerryhouse View Post
    Can you show us a full listing of /var/lib/dhcp3 with ls -la?

    Mine, for example is:


    Code:
    drwxr-xr-x  2 root root 4096 2008-03-01 19:20 .
    drwxr-xr-x 61 root root 4096 2008-05-03 07:45 ..
    -rw-r--r--  1 dhcp root  577 2007-07-31 18:32 dhclient.eth0.leases
    -rw-r--r--  1 root root    0 2008-03-01 19:20 dhclient.leases
    -rw-r--r--  1 dhcp root 9248 2008-05-26 21:20 dhclient.wlan0.leases
    As you can see, my leases files are owned by the dhcp user. The directory is owned by root, so it might be that if your directory is empty, then dhclient isn't able to write to it.

    I suggest the following:

    touch /var/lib/dhcp3/dhclieht.eth0.leases
    chown dhcp /var/lib/dhcp3/dhclieht.eth0.leases
    thanks! it seems that this trick fixed the problem
    and ls -al output showed that everything was owned by root.
    Is this a ubuntu bug? shouldn't ownership get assignment for this kind of stuff be during installation, och network configuration?

  6. #6
    Join Date
    Jun 2008
    Location
    In a home
    Beans
    Hidden!
    Distro
    Ubuntu 9.10 Karmic Koala

    Exclamation Re: dhclient error (FIX)

    I apparently a dhclient error after running 'UPDATED' in KPackage. After rebooting, my network would not come back up.

    I opened a Kterminal window, ran dhclient and got two permission issues.

    Code:
    can't create /var/lib/dhcp3/dhcpclient.leases
    can't create /var/run/dhcpclient.pid
    drop_proviliges: could not get group id: operation not permitted
    After I did a "sudo dhclient" all went ok, well kinda.

    I ran:
    Code:
    touch /var/lib/dhcp3/dhclient.eth0.leases
    But got:
    Code:
    can't touch /var/lib/dhcp3/dhclient.eth0.leases : Premission Denied
    So we had to run:
    Code:
    sudo touch /var/lib/dhcp3/dhclient.eth0.leases
    Then ran:
    Code:
    chown dhcp /var/lib/dhcp3/dhclient.eth0.leases
    I hoped this would fix the issue of booting and getting an IP address, but this did NOT. So I am looking for a solution.

    Thanks,
    Krillin

    P.S. Please note the word is CLIENT and not CLIEHT.
    Last edited by Krillin; June 25th, 2008 at 08:27 AM.

  7. #7
    Join Date
    Sep 2008
    Beans
    3

    Re: dhclient error

    This is a bug that has been reported several times, including:


    And it may go back to being a Debian problem. Regardless, it still isn't resolved in 11.10, so . . .

    The issue is that the dhcp3-client is pointing to a directory that doesn't exist (or hasn't been created by the installation)or that the original ifup command is wrong.

    ifup command:
    Code:
    dhclient3 -e IF_METRIC=100 -pf /var/run/dhclient.eth0.pid -lf /var/lib/dhcp3/dhclient.eth0.leases -1 eth0
    One workaround (assuming you have root privileges and that the original dhcp client is being run under root user is:

    Code:
    sudo mkdir /var/lib/dhcp3/
    sudo touch /var/lib/dhcp3/dhclient.eth0.leases

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •