# bind under systemd cannot create /var/run/named

## ktsaou

Hi,

I just switched from openrc to systemd.

For some reason bind complains that it cannot create the directory /var/run/named. It says: permission denied.

My /var/run is a symlink to /run.

I also have similar errors from freshclam.

Any ideas what is happening?

----------

## ktsaou

ok got it.

systemd is not ready for general use in gentoo.

Almost all services have their issues under systemd.

Switched back to openrc.

----------

## gerdesj

systemd is ready for general use.  I'll agree with you that some packages have not been ported yet but systemd units are easy to write or scraped from another distro.

I have just emerged bind onto my laptop and it simply started and worked so would you like to have another go?

```

# ls -l /var

...

lrwxrwxrwx  1 root   root     4 Feb 27  2014 run -> /run

```

```

# ls -l /

...

drwxr-xr-x  34 root   root    1020 Dec  9 00:51 run

```

```

# ls -l /var/run

...

drwxr-xr-x  2 named    named       40 Dec  9 00:51 named

```

What does ls -l /var/run give on your system for named ?

Cheers

Jon

----------

## weust

Same issue here.

Not sure what you mean with "..give on your system for named", but I got this when using ls -l /var/run:

```
 # ls -l /var/run

lrwxrwxrwx 1 root root 4 Apr 15  2014 /var/run -> /run
```

----------

## weust

I went ahead and did it a bit dirty, but at least I don't get errors anymore.

Before, when I (re)started named, I got this:

 *Quote:*   

> couldn't mkdir '/run/named': Permission denied
> 
> generating session key for dynamic DNS
> 
> couldn't mkdir '/var/run/named': Permission denied
> ...

 

I then, as root, created /run/named. That give the following error:

 *Quote:*   

> Could not open '/run/named/named.pid'.
> 
> Please check file and directory permissions or reconfigure the filename.
> 
> could not open file '/run/named/named.pid': Permission denied
> ...

 

I then did a chmod 777 /run/named on the /run/named, and no more errors:

 *Quote:*   

> generating session key for dynamic DNS

 

No doubt it's not right what I did, as it should be able to create and place the files there itself, but for my home usage it's fine.

Now just to figure out why, after the recent named update, it takes about five minuted for some sites to resolve while others are fine.

----------

