Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 08-27-2007, 10:44 PM   #1
Registered: Aug 2004
Location: Australia
Distribution: Slackware 12.1
Posts: 235

Rep: Reputation: 30
udev /dev/null permissions

This is not a problem with Slackware, it is an upgrade issue to do with my setup, and seems to be related to udev. In keeping with the CHANGES AND HINTS TEXT all udev rules have numerical prefixes (I have observed all the change requirements with respect to other services also. *Truly*, I have been over this process many times). Kernel is a using an initrd to boot. (Same issue with other kernels on my system).

After adding a udev rule for a palm device (completely unrelated) and restarting udev, and then opening a terminal in user mode, I get the message;
-bash /dev/null Permission denied
If I log out of the desktop or restart, I can't login, which is to be expected as there is no rw access to /dev/null for the user. Root is OK.

50.udev.rules kernel line
KERNEL=="null", NAME="%k", MODE="0666"
After restarting udev, or following a reboot (the same thing).
$ls -l /dev/null
crw-rw---- 1 root root 1, 3 2005-11-21 12:22 /dev/null
Change permissions and naturally everything works fine.
$chmod 666 /dev/null
crw-rw-rw- 1 root root 1, 3 2005-11-21 12:22 /dev/null
At the moment I have chmod etc embedded in a startup script.
I have tried several options relating to mount -o commands that I found on the net, in LQ, and other resources, however, they either didn't work, were not of much help or inconclusive. I can probably fix this with a few pointers in the right direction.

Deleting /dev/null and creating a new null was of no use as /dev/null is recreated during boot and the permission problem remains.

$mknod -m 666 null c 1 3

Last edited by The_Outlander; 08-30-2007 at 04:41 AM.
Old 08-28-2007, 12:17 AM   #2
Slackware Contributor
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,227

Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
This is indeed an odd one. I'd like to see the custom rule you added, and I'm also curious as to whether you added it to a custom rules file or to the default udev.rules file.

Line 253 of /etc/udev/rules.d/udev.rules should look like this:
KERNEL=="null",         NAME="%k", MODE="0666"
Make it look like this:
KERNEL=="null",         NAME="%k", MODE:="0666"
Have a look at udev(7) for more information on the ":=" assignment operator, but essentially it prevents the assigned value from being changed by later rules. Also, understand that this is intended to be a temporary fix until you find a real solution.

BTW, you can use udevtrigger(8) instead of restarting udev; you'll still want to reboot eventually after making changes to confirm that they work, but this is a handy way to get an idea before wasting time rebooting...
Old 08-29-2007, 09:00 AM   #3
Registered: Aug 2004
Location: Australia
Distribution: Slackware 12.1
Posts: 235

Original Poster
Rep: Reputation: 30
Thanks Robby,

This problem is fixed.

1. I removed the custom rules and restarted udev, NO CHANGE, /dev/null problem persisted.

2. Edited line 253 /etc/udev/rules.d/udev.rules using the == assignment operator; ...MODE=="0666" setting the /dev/null permissions correctly. The udev restart process took over a minute to complete following this change.

3. Changed assignment operator back to = (...MODE="0666") and correct /dev/null permissions persist throughout subsequent start-ups.

Thanks again for your help.

Last edited by The_Outlander; 08-30-2007 at 04:39 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
/dev/null permissions irvken Linux - Software 2 11-27-2006 04:03 AM
udev is about to beat me (/dev/null, etc) CowboyJ Linux - Hardware 5 07-06-2005 09:12 AM
/dev/null permissions and kde issues PseudoRandom Debian 2 05-04-2005 04:16 PM
/dev/sound/* permissions reset using udev ratman96 Linux - General 0 05-04-2005 02:13 PM
/dev/null permissions? alaios Linux - General 2 10-09-2004 03:56 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:46 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration