[blfs-dev] dhcpcd overrides /var/tmp permissions?

Bruce Dubbs bruce.dubbs at gmail.com
Wed Sep 23 09:27:54 PDT 2015


Pierre Labastie wrote:
> Hi,
>
> When starting KDE4 with the "xinitrc" method, I got an error in an X
> dialog:
> ------------
> Call to lnusertemp failed (temporary directories full?). Check your
> installation.
> ------------
>
> and there is this message in the terminal where I typed "startx":
> ------------
> Error: cannot create directory "/var/tmp/kde-cache-pierre": Permission
> denied
> ------------
>
> So I looked at /var/tmp:
> pierre [ ~ ]$ ls -ld /var/tmp
> drwxr-xr-x 3 root root 4096 23 sept. 13:48 /var/tmp
>
> However, /var/tmp is created in LFS "Creating Directories" page as:
>
> install -dv -m 1777 /tmp /var/tmp
>
> So somehow, the permissions got changed. I grepped the BLFS source for
> /var/tmp and found only one page where it occured: dhcpcd:
> There is the configure option --dbdir=/var/tmp
>
> So my guess is that dhcpcd changes the permissions of its "dbdir". It
> might be better to use another name?

I did a test:

$ sudo chmod 1777 /var/tmp
$ ll -d /var/tmp
drwxrwxrwt 2 root root 4096 Sep 18 15:45 /var/tmp
$ sudo install -d /var/tmp
$ ll -d /var/tmp
drwxr-xr-x 2 root root 4096 Sep 18 15:45 /var/tmp

So install changes the permissions of an existing directory.  The 
install command is in my dhcpcd package log. So we need to change it 
back after make install or do a sed to make it

install -m1777 -d /var/tmp

Alternatively, we can change the switch to --dbdir=/var/tmp/dhcpcd or 
perhaps /var/cache/dhcpcd.  The default is /var/db.  We could use that, 
but right now I am in favor of /var/cache/dhcpcd.

   -- Bruce


More information about the blfs-dev mailing list