Results 1 to 6 of 6

Thread: [8.04] /dev/null permissions change

  1. #1
    Join Date
    Jul 2008
    Location
    Amsterdam
    Beans
    4
    Distro
    Kubuntu 8.04 Hardy Heron

    [8.04] /dev/null permissions change

    Hi there,

    I'm having this problem a few days now and I'm having a hard time looking in the right places:
    Opening a terminal I get a lot of lines saying
    bash /dev/null permission denied
    Code:
    ls- l /dev/null
    gives
    Code:
    crw------- 1 root root 1, 3 2008-05-09 11:05 /dev/null
    I've been looking on the web and over here and found many solutions like

    Code:
    sudo chown 666 /dev/null
    and

    Code:
    chmod a+rw /dev/null
    and

    Code:
    sudo rm /dev/null
    sudo mknod -m 666 /dev/null c 1 3
    sudo chown root:root /dev/null
    resulting in:
    Code:
    crw-rw-rw- 1 root root 1, 3 2008-07-03 09:59 /dev/null
    which works until the next reboot.

    Following the line of this thread: http://ubuntuforums.org/showthread.p...mission+denied

    I get:
    Code:
    grep root /etc/udev/rules.d/*
    Code:
    /etc/udev/rules.d/40-permissions.rules:# device on the bus and those devices may do anything as root on your system.
    /etc/udev/rules.d/80-programs.rules:    RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0640 -G disk $root/%k"
    and:
    Code:
    grep null /etc/udev/rules.d/*
    Code:
    /etc/udev/rules.d/40-basic-permissions.rules:KERNEL=="null",                            MODE="0666"
    How do I find out what's causing this?
    Does it have anything to to with the floppy device?
    Which log tells me more?

    Help is very much appreciated.

  2. #2
    Join Date
    Mar 2006
    Location
    Nerderlands
    Beans
    1,349
    Distro
    Ubuntu

    Re: [8.04] /dev/null permissions change

    weird.. in the link you give, they grep for "terminator" not "root". so the first output you can ignore.
    the grep on "null" apears correct.

    this bit:
    sudo rm /dev/null
    sudo mknod -m 666 /dev/null c 1 3
    sudo chown root:root /dev/null

    should fix things...


    can you find anything in your /var/log/udev? empty it, then reboot, see what you find on /dev/null in there?
    "Please choose a different password, the one you have chosen is in use by UID 1432"

  3. #3
    Join Date
    Aug 2006
    Location
    Netherlands
    Beans
    7
    Distro
    Ubuntu 6.06

    Re: [8.04] /dev/null permissions change

    It seems he renamed his root account to terminator or so.
    I apllied the grep resulting in
    Code:
    /etc/udev/rules.d/40-permissions.rules:# device on the bus and those devices may do anything as root on your system.
    /etc/udev/rules.d/80-programs.rules:    RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0640 -G disk $root/%k"
    with root.

    The grep null looks similar to what I've seen in other threads.
    The grep root does not.


    Code:
    sudo rm /dev/null
    sudo mknod -m 666 /dev/null c 1 3
    sudo chown root:root /dev/null
    Only helps until the reboot, thereafter it all starts over again.

    Weird thing is, I don't seem to have a /var/log/udev
    where else might it reside?

  4. #4
    Join Date
    Jul 2008
    Location
    Amsterdam
    Beans
    4
    Distro
    Kubuntu 8.04 Hardy Heron

    Re: [8.04] /dev/null permissions change

    Ok, that was silly: I found /var/log/udev.

    I emptied it, but this did not help.

    when /var/log/udev fills again, the only mentioning of /dev/null i find to be:

    UDEV [1215091088.577371] add /devices/virtual/mem/null (mem)
    UDEV_LOG=3
    ACTION=add
    DEVPATH=/devices/virtual/mem/null
    SUBSYSTEM=mem
    MAJOR=1
    MINOR=3
    SEQNUM=1957
    UDEVD_EVENT=1
    DEVNAME=/dev/null
    In this link there's also a similar, although perhaps different problem. https://bugs.launchpad.net/ubuntu/+s...ev/+bug/149346

    If I do the mentioned ls commands,

    Code:
    ls /etc/rcS.d | grep udev
    I get:
    Code:
    S10udev
    S37udev-finish
    and on
    Code:
    ls /etc/rc2.d | grep udev
    I get:
    Code:
    S50udev
    S50udev-finish
    no idea if it's good or bad.
    Last edited by martinix; July 3rd, 2008 at 02:37 PM. Reason: additional info

  5. #5
    Join Date
    Jul 2008
    Location
    Amsterdam
    Beans
    4
    Distro
    Kubuntu 8.04 Hardy Heron

    Re: [8.04] /dev/null permissions change

    grasping in the dark, latest update:

    reading some files in /etc/udev/rules.d

    In /etc/udev/rules.d/40-permissions.rules (which is the file that to me beginner seems most relevant),

    I find:
    Code:
    # Block devices
    SUBSYSTEM!="block", GOTO="block_end"
    ATTRS{removable}!="1",                  GROUP="disk"
    ATTRS{removable}=="1",                  GROUP="floppy"
    SUBSYSTEMS=="usb",                      GROUP="plugdev"
    SUBSYSTEMS=="ieee1394",                 GROUP="plugdev"
    SUBSYSTEMS=="mmc",                      GROUP="plugdev"
    SUBSYSTEMS=="pcmcia",                   GROUP="plugdev"
    LABEL="block_end"
    
    # IDE devices
    ENV{ID_CDROM}=="?*",                    GROUP="cdrom"
    KERNEL=="ht[0-9]*",                     GROUP="tape"
    KERNEL=="nht[0-9]*",                    GROUP="tape"
    
    # IEEE1394 (firewire) devices
    # Please note that raw1394 gives unrestricted, raw access to every single
    # device on the bus and those devices may do anything as root on your system.
    # Yes, I know it also happens to be the only way to rewind your video camera,
    # but it's not going to be group "video", okay?
    KERNEL=="raw1394",                      GROUP="disk"
    KERNEL=="dv1394*",                      GROUP="video"
    KERNEL=="video1394*",                   GROUP="video"
    
    # Packet CD devices, group under /dev/pktcdvd
    KERNEL=="pktcdvd",                      MODE="0644"
    KERNEL=="pktcdvd[0-9]*",                GROUP="cdrom"
    
    # Printers and Parallel devices
    SUBSYSTEM=="printer",                   GROUP="lp"
    SUBSYSTEM=="ppdev",                     GROUP="lp"
    SUBSYSTEM=="usb", KERNEL=="lp[0-9]*",   GROUP="lp"
    KERNEL=="pt[0-9]*",                     GROUP="tape"
    KERNEL=="pht[0-9]*",                    GROUP="tape"
    
    # SCSI devices
    SUBSYSTEMS=="scsi", GOTO="scsi_start"
    GOTO="scsi_end"
    LABEL="scsi_start"
    ATTRS{type}=="0",                       GROUP="disk"
    ATTRS{type}=="1",                       GROUP="tape"
    ATTRS{type}=="4",                       GROUP="cdrom"
    ATTRS{type}=="5",                       GROUP="cdrom"
    ATTRS{type}=="6",                       GROUP="scanner"
    ATTRS{type}=="8",                       GROUP="tape"
    ATTRS{type}=="3", ATTRS{vendor}=="HP",  GROUP="scanner"
    ATTRS{type}=="3", ATTRS{vendor}=="Epson", GROUP="scanner"
    ATTRS{type}=="3", ATTRS{vendor}=="EPSON", GROUP="scanner"
    LABEL="scsi_end"
    
    # Serial devices
    SUBSYSTEM=="tty",                       GROUP="dialout"
    SUBSYSTEM=="capi",                      GROUP="dialout"
    SUBSYSTEM=="slamr",                     GROUP="dialout"
    SUBSYSTEM=="zaptel",                    GROUP="dialout"
    KERNEL=="ttyLTM[0-9]*",                 GROUP="dialout", MODE="0660"
    
    # USB serial converters
    SUBSYSTEM=="usb_device", GOTO="usb_serial_start"
    SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GOTO="usb_serial_start"
    GOTO="usb_serial_end"
    LABEL="usb_serial_start"
    ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", \
                                            MODE="0660", GROUP="dialout"
    LABEL="usb_serial_end"
    
    # Sound devices
    SUBSYSTEM=="sound",                     GROUP="audio"
    
    # pty devices
    SUBSYSTEM=="tty", KERNEL=="pty*",       GROUP="tty", MODE="0666"
    
    # Video devices
    SUBSYSTEM=="drm",                       GROUP="video"
    SUBSYSTEM=="dvb",                       GROUP="video"
    SUBSYSTEM=="graphics",                  GROUP="video"
    SUBSYSTEM=="video4linux",               GROUP="video"
    KERNEL=="agpgart",                      GROUP="video"
    KERNEL=="nvidia*",                      GROUP="video"
    SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GOTO="usb_serial_start"
    GOTO="usb_serial_end"
    LABEL="usb_serial_start"
    ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", \
                                            MODE="0660", GROUP="dialout"
    LABEL="usb_serial_end"
    
    # Sound devices
    SUBSYSTEM=="sound",                     GROUP="audio"
    
    # pty devices
    SUBSYSTEM=="tty", KERNEL=="pty*",       GROUP="tty", MODE="0666"
    
    # Video devices
    SUBSYSTEM=="drm",                       GROUP="video"
    SUBSYSTEM=="dvb",                       GROUP="video"
    SUBSYSTEM=="graphics",                  GROUP="video"
    SUBSYSTEM=="video4linux",               GROUP="video"
    KERNEL=="agpgart",                      GROUP="video"
    KERNEL=="nvidia*",                      GROUP="video"
    
    # Other devices, by name
    KERNEL=="mem",                          GROUP="kmem", MODE="0640"
    KERNEL=="kmem",                         GROUP="kmem", MODE="0640"
    KERNEL=="port",                         GROUP="kmem", MODE="0640"
    KERNEL=="nvram",                        GROUP="nvram"
    KERNEL=="rtc",                          GROUP="audio"
    KERNEL=="js[0-9]*",                     GROUP="plugdev"

    Since "mem" was the only mentioning I found in /var/log/udev, perhaps something is wrong with
    Code:
    KERNEL=="mem",                          GROUP="kmem", MODE="0640"
    ?

    I find in /etc/udev/rules.d/80-programs.rules

    Code:
    # Load firmware on demand
    SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware_helper"
    
    # Create special nodes for floppy devices
    KERNEL=="fd[0-9]*", ACTION=="add", ATTRS{cmos}=="?*", \
            RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0640 -G disk $root/%k"
    which was the second remark outputted by
    Code:
    grep root /etc/udev/rules.d/*

  6. #6
    Join Date
    Jul 2008
    Location
    Amsterdam
    Beans
    4
    Distro
    Kubuntu 8.04 Hardy Heron

    Re: [8.04] /dev/null permissions change

    anyone, please?

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •