# Permissions on /dev/null, /dev/urandom, /dev/random

## KayZee

How can I set permission of /dev/null, /dev/urandom and /dev/random?  I am having problems with Gnome starting and .xsession-error says that permission is denined to /dev/null.  If I manually set the permission on /dev/null to rw-rw-rw (666) Gnome will start, but after rebooting the permissions are set back to rw-rw--- (660).   

Also get an error abouat "PRNG not seeded" when starting Gnome because of permissions on /dev/urandom.  Again setting permissions to rw-rw-r-- will allow Gnome to start, but after a reboot the permissions are set back to rw-rw--- (660).

--Karl

----------

## jdgill0

KayZee,

Have you just upgraded udev on your system?  If so, search on the forums for udev problems, I seem to recall some people posting problems with /dev/null after an upgrade of udev.

----------

## boogerman

type in umask as both user and root and post the output. It sounds like devfs or udev is creating the devices and umask is taking away the permissions.

----------

## KayZee

Sovled...

I had done an update on udev a day or so ago.  I missed an update.  There was a new .cfg0000_50-udev.rules file that I did not copy to 50-udev.rules.  After dong that permissions were set properly at boot.  

It looks like Gnome needs /dev/null, /dev/urandom and maybe /dev/random.  Any way for someone else searching the forums for probelms with Gnome starting and if .xsession-error contains a reference to permission on /dev/null, check that you have applied all the updates for the .cfg0000_xxxxxx files.

--Karl

----------

## jrperiod

 *KayZee wrote:*   

> Sovled...
> 
> I had done an update on udev a day or so ago.  I missed an update.  There was a new .cfg0000_50-udev.rules file that I did not copy to 50-udev.rules.  After dong that permissions were set properly at boot.  
> 
> It looks like Gnome needs /dev/null, /dev/urandom and maybe /dev/random.  Any way for someone else searching the forums for probelms with Gnome starting and if .xsession-error contains a reference to permission on /dev/null, check that you have applied all the updates for the .cfg0000_xxxxxx files.
> ...

 

Im sorry, but coudl you explain what exactly it is that you did here cause I have NO IDEA....

----------

## jdgill0

jrperiod,

KayZee had failed to run etc-update and accept the changes for udev.rules after having upgraded udev.

----------

## jrperiod

 *jdgill0 wrote:*   

> jrperiod,
> 
> KayZee had failed to run etc-update and accept the changes for udev.rules after having upgraded udev.

 

I guess im not really sure what udev is, so thi part is wht I dont understand

 *Quote:*   

> I had done an update on udev a day or so ago. I missed an update. There was a new .cfg0000_50-udev.rules file that I did not copy to 50-udev.rules. After dong that permissions were set properly at boot.
> 
> 

 

----------

## jdgill0

jrperiod,

In the not-too-distant past, Gentoo officially used devfs with the 2.4 kernels, which is responsible for the stuff in your /dev directory. Due to limitations/problems with devfs, udev -- aka userspace devfs -- was developed as a replacement for devfs. Unlike the 2.4 kernels, the 2.6 kernels are ready to use udev. Gentoo officially moved to the 2.6 kernel and udev with the 2005.0 release. To use udev, you remove support for devfs in the kernel (or you can use kernel parameters in grub/lilo as well) and you emerge udev. Recently there was a stable update in portage for udev, going from udev-045 to udev-056. When you emerge udev, you will get the files within /etc/udev/.  One of those files happens to be 50-udev.rules. Well, portage is designed such that it does not automatically replace the original configuration files within /etc, but instead it will create temporary files called for example .cfg0000_50-udev.rules. When you run etc-update, it searches /etc for .cfg0000_* files, and then prompts you for instructions on what to do: keep original, keep the update (i.e. .cfg0000_*), or merge the two. KayZee had failed to do an update after emerging the newer udev, which happened to have an update for the 50-udev.rules configuration file within /etc/udev/rules.d.

I also recommend you read the Gentoo 2005.0 Handbook -- specifically 4. Additional Portage Tools.

----------

## jrperiod

Ok, I actually did the etc-update and replaced the file with the new one, but Im still unable to log in a a user.

I was directed here from a link in my post https://forums.gentoo.org/viewtopic-t-337543.html

, which i dont think is the same problem.

----------

## guid0

managed to solve my problem with

```
chmod 666 /dev/tty
```

 :Very Happy: 

cheers,

guid0

----------

## mrsteven

On my system everybody is permitted to write to /dev/random:

```
stefan@mrsteven-mobil ~ $ ls -l /dev/*random

crw-rw-rw-  1 root root 1, 8 25. Feb 19:16 /dev/random

cr--r--r--  1 root root 1, 9 25. Feb 18:08 /dev/urandom
```

This is the default udev configuration for udev-079-r1. I think this is wrong. (Or am I?  :Shocked:  )

----------

