---
title: "couldn't open pid file '/varunamed.pid': Permission denied error"
slug: "aa-00304"
description: "You are most likely running named as a non-root user and that user does not have permission to write in /var/run."
tags: ["errors", "permissions", "logs"]
updated: 2018-10-26T18:33:34Z
published: 2018-10-26T18:33:34Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://kb.isc.org/llms.txt
> Use this file to discover all available pages before exploring further.

# I see a log message like the following. Why? couldn't open pid file '/varunamed.pid': Permission denied

You are most likely running **named** as a non-root user and that user does not have permission to write in /var/run. The common ways of fixing this are to use the "pid-file" configuration statement in `named.conf` to specify an alternate location where the uid running **named** *does* have write permission. For example, you could create a /var/run/named directory owned by the **named** user and set pid-file to "/var/run/named/named.pid".
