simonclausen/dnscrypt-autoinstall — pull request #5 by AladW (2014-04-10 23:17:35+00:00)
Title: dnscrypt user unable to chroot

While making a few changes to my network, I've noticed DNSCrypt hasn't run for three days.

Launching it via ```/etc/init.d/dnscrypt-proxy``` or ```dnscrypt-proxy -d -u dnscrypt``` gave no errors, but no launched process either.

/var/log/daemon.log

```Apr 8 02:29:43 arbellen dnscrypt-proxy[2112]: Generating a new key pair
Apr 8 02:29:43 arbellen dnscrypt-proxy[2112]: Done
Apr 8 02:29:44 arbellen dnscrypt-proxy[2112]: Unable to chroot to [/var/run/dnscrypt]```

ls -l /var/run

```lrwxrwxrwx 1 root root 4 apr 6 20:12 /var/run -> /run```

Deleting the user and making a new one with a /run home made it work again. I've also replaced ```useradd``` with ```adduser``` (man useradd mentions to) and added some safety checks (/bin/false, disabled pw/login)