# /dev/null permissions problem

## katelyn

I am having the "/dev/null: permission denied" problem that seems to be quite common from searching the forums. I know the problem is normally caused by udev. However, the suggested solution of unmerging udev, deleting /etc/udev and remerging udev did not work. I know that my udev rules file is correct as it contains the line:

KERNEL=="null",		NAME="%k", MODE="0666"

However, although I keep chmod'ing /dev/null to 666, something is still changing the permissions to 600 every day:

```

shadow ~ $ stat /dev/null

  File: `/dev/null'

  Size: 0               Blocks: 0          IO Block: 4096   character special file

Device: dh/13d  Inode: 1377        Links: 1     Device type: 1,3

Access: (0600/crw-------)  Uid: (    0/    root)   Gid: (    0/    root)

Access: 2005-12-11 21:08:43.000000000 +0000

Modify: 2005-12-11 21:08:43.000000000 +0000

Change: 2006-04-16 01:58:33.000000000 +0100

```

Does anyone have any idea what keeps changing the permissions back?

----------

## mirojira

I am sorry that I can't help. But I am also waiting for any response. I have the same problem with /dev/hdc.

----------

## ldima24

 *katelyn wrote:*   

> I am having the "/dev/null: permission denied" problem that seems to be quite common from searching the forums. I know the problem is normally caused by udev. However, the suggested solution of unmerging udev, deleting /etc/udev and remerging udev did not work. I know that my udev rules file is correct as it contains the line:
> 
> KERNEL=="null",		NAME="%k", MODE="0666"
> 
> However, although I keep chmod'ing /dev/null to 666, something is still changing the permissions to 600 every day:
> ...

 

If you have syslog-ng and one of your destinations is /dev/null, then everytime syslog-ng logs message to /dev/null, it will change its permissions to 0600. You can avoid it by defining your destination as follows:

```
destination throw_away  { file("/dev/null" perm(0666)); };
```

----------

