LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 08-27-2007, 09:44 PM   #1
The_Outlander
Member
 
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 2.6.21.5-smp 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;
Quote:
-bash /dev/null Permission denied
username@box:~$
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
Quote:
KERNEL=="null", NAME="%k", MODE="0666"
After restarting udev, or following a reboot (the same thing).
Quote:
$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.
Quote:
$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.
Thanks.

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

Quote:
$mknod -m 666 null c 1 3

Last edited by The_Outlander; 08-30-2007 at 03:41 AM.
 
Old 08-27-2007, 11:17 PM   #2
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,913

Rep: Reputation: Disabled
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:
Code:
KERNEL=="null",         NAME="%k", MODE="0666"
Make it look like this:
Code:
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, 08:00 AM   #3
The_Outlander
Member
 
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 03:39 AM.
 
  


Reply


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 03:03 AM
udev is about to beat me (/dev/null, etc) CowboyJ Linux - Hardware 5 07-06-2005 08:12 AM
/dev/null permissions and kde issues PseudoRandom Debian 2 05-04-2005 03:16 PM
/dev/sound/* permissions reset using udev ratman96 Linux - General 0 05-04-2005 01:13 PM
/dev/null permissions? alaios Linux - General 2 10-09-2004 02:56 PM


All times are GMT -5. The time now is 10:39 PM.

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