/dev/* ownership and groupership?

/dev/* ownership and groupership?

Post by Nate Warne » Mon, 28 Jan 2002 09:35:12



Setup question:

I have two machines currently running RH7.2 as installed by me (user X).

I noted that when my wife logged into one of the machines (hadn't tried on
other until later), the sound server complained that it did not have
permission to get to the DSP device.  So when I checked out /dev, I found
that a good number (see below) of the devices were owned by user X with
group of root.  This was true whether I logged in via a telnet (no other
login sessions) or checked when logged in under X as my wife.

I checked the other machine only to find similar results.

What's up?  None of the docs I found got onto the subject (kernel source
docs, several books from linuxdocs.org, man pages, etc.).

I suspect that MAKEDEV did it as my user instead of as root, but even still
I'm corn-fused.  All else aside, what should they be? Owner root group
root/floppy/disk for all?  Below is a list of the devices that are screwy
looking (currently logged in, so that might affect things).

Thanks!

Nate

crw-------    1 UserX   root      10, 134 Aug 30 16:30 apm_bios
crw-------    1 UserX   root      14,   4 Aug 30 16:30 audio
crw-------    1 UserX   root      14,  20 Aug 30 16:30 audio1
crw-------    1 UserX   root      14,   7 Aug 30 16:30 audioctl
crw-------    1 UserX   root      10, 128 Aug 30 16:30 beep
crw-------    1 UserX   root       5,   1 Jan 26 09:01 console
crw-------    1 UserX   root      14,   3 Aug 30 16:30 dsp
crw-------    1 UserX   root      14,  19 Aug 30 16:30 dsp1
crw-------    1 UserX   root      55,   0 Aug 30 16:30 dsp56k
crw-------    1 UserX   root      29,   0 Aug 30 16:30 fb0
crw-------    1 UserX   root      29,   1 Aug 30 16:30 fb1
crw-------    1 UserX   root      29,  10 Aug 30 16:30 fb10
crw-------    1 UserX   root      29,  11 Aug 30 16:30 fb11
crw-------    1 UserX   root      29,  12 Aug 30 16:30 fb12
crw-------    1 UserX   root      29,  13 Aug 30 16:30 fb13
crw-------    1 UserX   root      29,  14 Aug 30 16:30 fb14
crw-------    1 UserX   root      29,  15 Aug 30 16:30 fb15
crw-------    1 UserX   root      29,  16 Aug 30 16:30 fb16
crw-------    1 UserX   root      29,  17 Aug 30 16:30 fb17
crw-------    1 UserX   root      29,  18 Aug 30 16:30 fb18
crw-------    1 UserX   root      29,  19 Aug 30 16:30 fb19
crw-------    1 UserX   root      29,   2 Aug 30 16:30 fb2
crw-------    1 UserX   root      29,  20 Aug 30 16:30 fb20
crw-------    1 UserX   root      29,  21 Aug 30 16:30 fb21
crw-------    1 UserX   root      29,  22 Aug 30 16:30 fb22
crw-------    1 UserX   root      29,  23 Aug 30 16:30 fb23
crw-------    1 UserX   root      29,  24 Aug 30 16:30 fb24
crw-------    1 UserX   root      29,  25 Aug 30 16:30 fb25
crw-------    1 UserX   root      29,  26 Aug 30 16:30 fb26
crw-------    1 UserX   root      29,  27 Aug 30 16:30 fb27
crw-------    1 UserX   root      29,  28 Aug 30 16:30 fb28
crw-------    1 UserX   root      29,  29 Aug 30 16:30 fb29
crw-------    1 UserX   root      29,   3 Aug 30 16:30 fb3
crw-------    1 UserX   root      29,  30 Aug 30 16:30 fb30
crw-------    1 UserX   root      29,  31 Aug 30 16:30 fb31
crw-------    1 UserX   root      29,   4 Aug 30 16:30 fb4
crw-------    1 UserX   root      29,   5 Aug 30 16:30 fb5
crw-------    1 UserX   root      29,   6 Aug 30 16:30 fb6
crw-------    1 UserX   root      29,   7 Aug 30 16:30 fb7
crw-------    1 UserX   root      29,   8 Aug 30 16:30 fb8
crw-------    1 UserX   root      29,   9 Aug 30 16:30 fb9
brw-rw----    1 UserX   floppy     2,   0 Aug 30 16:30 fd0
brw-rw----    1 UserX   floppy     2,   4 Aug 30 16:30 fd0CompaQ
brw-rw----    1 UserX   floppy     2,   4 Aug 30 16:30 fd0d360
brw-rw----    1 UserX   floppy     2,  12 Aug 30 16:30 fd0D360
brw-rw----    1 UserX   floppy     2,  16 Aug 30 16:30 fd0D720
brw-rw----    1 UserX   floppy     2,   8 Aug 30 16:30 fd0h1200
brw-rw----    1 UserX   floppy     2,  40 Aug 30 16:30 fd0h1440
brw-rw----    1 UserX   floppy     2,  28 Aug 30 16:30 fd0H1440
brw-rw----    1 UserX   floppy     2,  56 Aug 30 16:30 fd0h1476
brw-rw----    1 UserX   floppy     2,  72 Aug 30 16:30 fd0h1494
brw-rw----    1 UserX   floppy     2,  92 Aug 30 16:30 fd0h1660
brw-rw----    1 UserX   floppy     2,  20 Aug 30 16:30 fd0h360
brw-rw----    1 UserX   floppy     2,  12 Aug 30 16:30 fd0H360
brw-rw----    1 UserX   floppy     2,  48 Aug 30 16:30 fd0h410
brw-rw----    1 UserX   floppy     2,  64 Aug 30 16:30 fd0h420
brw-rw----    1 UserX   floppy     2,  24 Aug 30 16:30 fd0h720
brw-rw----    1 UserX   floppy     2,  16 Aug 30 16:30 fd0H720
brw-rw----    1 UserX   floppy     2,  80 Aug 30 16:30 fd0h880
brw-rw----    1 UserX   floppy     2,  84 Aug 30 16:30 fd0u1040
brw-rw----    1 UserX   floppy     2,  88 Aug 30 16:30 fd0u1120
brw-rw----    1 UserX   floppy     2,  28 Aug 30 16:30 fd0u1440
brw-rw----    1 UserX   floppy     2, 124 Aug 30 16:30 fd0u1660
brw-rw----    1 UserX   floppy     2,  44 Aug 30 16:30 fd0u1680
brw-rw----    1 UserX   floppy     2,  60 Aug 30 16:30 fd0u1722
brw-rw----    1 UserX   floppy     2,  76 Aug 30 16:30 fd0u1743
brw-rw----    1 UserX   floppy     2,  96 Aug 30 16:30 fd0u1760
brw-rw----    1 UserX   floppy     2, 116 Aug 30 16:30 fd0u1840
brw-rw----    1 UserX   floppy     2, 100 Aug 30 16:30 fd0u1920
brw-rw----    1 UserX   floppy     2,  32 Aug 30 16:30 fd0u2880
brw-rw----    1 UserX   floppy     2, 104 Aug 30 16:30 fd0u3200
brw-rw----    1 UserX   floppy     2, 108 Aug 30 16:30 fd0u3520
brw-rw----    1 UserX   floppy     2,  12 Aug 30 16:30 fd0u360
brw-rw----    1 UserX   floppy     2, 112 Aug 30 16:30 fd0u3840
brw-rw----    1 UserX   floppy     2,  16 Aug 30 16:30 fd0u720
brw-rw----    1 UserX   floppy     2, 120 Aug 30 16:30 fd0u800
brw-rw----    1 UserX   floppy     2,  52 Aug 30 16:30 fd0u820
brw-rw----    1 UserX   floppy     2,  68 Aug 30 16:30 fd0u830
brw-rw----    1 UserX   floppy     2,   1 Aug 30 16:30 fd1
brw-rw----    1 UserX   floppy     2,   5 Aug 30 16:30 fd1CompaQ
brw-rw----    1 UserX   floppy     2,   5 Aug 30 16:30 fd1d360
brw-rw----    1 UserX   floppy     2,  13 Aug 30 16:30 fd1D360
brw-rw----    1 UserX   floppy     2,  17 Aug 30 16:30 fd1D720
brw-rw----    1 UserX   floppy     2,   9 Aug 30 16:30 fd1h1200
brw-rw----    1 UserX   floppy     2,  41 Aug 30 16:30 fd1h1440
brw-rw----    1 UserX   floppy     2,  29 Aug 30 16:30 fd1H1440
brw-rw----    1 UserX   floppy     2,  57 Aug 30 16:30 fd1h1476
brw-rw----    1 UserX   floppy     2,  73 Aug 30 16:30 fd1h1494
brw-rw----    1 UserX   floppy     2,  93 Aug 30 16:30 fd1h1660
brw-rw----    1 UserX   floppy     2,  21 Aug 30 16:30 fd1h360
brw-rw----    1 UserX   floppy     2,  13 Aug 30 16:30 fd1H360
brw-rw----    1 UserX   floppy     2,  49 Aug 30 16:30 fd1h410
brw-rw----    1 UserX   floppy     2,  65 Aug 30 16:30 fd1h420
brw-rw----    1 UserX   floppy     2,  25 Aug 30 16:30 fd1h720
brw-rw----    1 UserX   floppy     2,  17 Aug 30 16:30 fd1H720
brw-rw----    1 UserX   floppy     2,  81 Aug 30 16:30 fd1h880
brw-rw----    1 UserX   floppy     2,  85 Aug 30 16:30 fd1u1040
brw-rw----    1 UserX   floppy     2,  89 Aug 30 16:30 fd1u1120
brw-rw----    1 UserX   floppy     2,  29 Aug 30 16:30 fd1u1440
brw-rw----    1 UserX   floppy     2, 125 Aug 30 16:30 fd1u1660
brw-rw----    1 UserX   floppy     2,  45 Aug 30 16:30 fd1u1680
brw-rw----    1 UserX   floppy     2,  61 Aug 30 16:30 fd1u1722
brw-rw----    1 UserX   floppy     2,  77 Aug 30 16:30 fd1u1743
brw-rw----    1 UserX   floppy     2,  97 Aug 30 16:30 fd1u1760
brw-rw----    1 UserX   floppy     2, 117 Aug 30 16:30 fd1u1840
brw-rw----    1 UserX   floppy     2, 101 Aug 30 16:30 fd1u1920
brw-rw----    1 UserX   floppy     2,  33 Aug 30 16:30 fd1u2880
brw-rw----    1 UserX   floppy     2, 105 Aug 30 16:30 fd1u3200
brw-rw----    1 UserX   floppy     2, 109 Aug 30 16:30 fd1u3520
brw-rw----    1 UserX   floppy     2,  13 Aug 30 16:30 fd1u360
brw-rw----    1 UserX   floppy     2, 113 Aug 30 16:30 fd1u3840
brw-rw----    1 UserX   floppy     2,  17 Aug 30 16:30 fd1u720
brw-rw----    1 UserX   floppy     2, 121 Aug 30 16:30 fd1u800
brw-rw----    1 UserX   floppy     2,  53 Aug 30 16:30 fd1u820
brw-rw----    1 UserX   floppy     2,  69 Aug 30 16:30 fd1u830
srwx------    1 UserX   root            0 Jan 26 09:01 gpmctl
brw-------    1 UserX   disk      22,   0 Aug 30 16:30 hdc
crw-------    1 UserX   root      35,   0 Aug 30 16:30 midi0
crw-------    1 UserX   root      14,   2 Aug 30 16:30 midi00
crw-------    1 UserX   root      14,  18 Aug 30 16:30 midi01
crw-------    1 UserX   root      14,  34 Aug 30 16:30 midi02
crw-------    1 UserX   root      14,  50 Aug 30 16:30 midi03
crw-------    1 UserX   root      35,   1 Aug 30 16:30 midi1
crw-------    1 UserX   root      35,   2 Aug 30 16:30 midi2
crw-------    1 UserX   root      35,   3 Aug 30 16:30 midi3
crw-------    1 UserX   root      14,   0 Aug 30 16:30 mixer
crw-------    1 UserX   root      14,  16 Aug 30 16:30 mixer1
crw-------    1 UserX   root      81,  64 Aug 30 16:30 radio0
crw-------    1 UserX   root      81,  65 Aug 30 16:30 radio1
crw-------    1 UserX   root      81,  66 Aug 30 16:30 radio2
crw-------    1 UserX   root      81,  67 Aug 30 16:30 radio3
brw-------    1 UserX   disk      11,   0 Aug 30 16:30 scd0
crw-------    1 UserX   root      14,   1 Aug 30 16:30 sequencer
crw-------    1 UserX   root      81, 224 Aug 30 16:30 vbi0
crw-------    1 UserX   root      81, 225 Aug 30 16:30 vbi1
crw-------    1 UserX   root      81, 226 Aug 30 16:30 vbi2
crw-------    1 UserX   root      81, 227 Aug 30 16:30 vbi3
crw-------    1 UserX   root      81,   0 Aug 30 16:30 video0
crw-------    1 UserX   root      81,   1 Aug 30 16:30 video1
crw-------    1 UserX   root      81,   2 Aug 30 16:30 video2
crw-------    1 UserX   root      81,   3 Aug 30 16:30 video3
crw-------    1 UserX   root      83,   0 Aug 30 16:30 vtx
crw-------    1 UserX   root      81, 192 Aug 30 16:30 vtx0
crw-------    1 UserX   root      81, 193 Aug 30 16:30 vtx1
crw-------    1 UserX   root      81, 194 Aug 30 16:30
...

read more »

 
 
 

/dev/* ownership and groupership?

Post by S. Par » Wed, 30 Jan 2002 13:04:48



> Setup question:

> I have two machines currently running RH7.2 as installed by me (user X).

> I noted that when my wife logged into one of the machines (hadn't tried on
> other until later), the sound server complained that it did not have
> permission to get to the DSP device.  So when I checked out /dev, I found
> that a good number (see below) of the devices were owned by user X with
> group of root.  This was true whether I logged in via a telnet (no other
> login sessions) or checked when logged in under X as my wife.

> I checked the other machine only to find similar results.

> What's up?  None of the docs I found got onto the subject (kernel source
> docs, several books from linuxdocs.org, man pages, etc.).

> I suspect that MAKEDEV did it as my user instead of as root, but even still
> I'm corn-fused.  All else aside, what should they be? Owner root group
> root/floppy/disk for all?  Below is a list of the devices that are screwy
> looking (currently logged in, so that might affect things).

> Thanks!

> Nate

> crw-------    1 UserX   root      10, 134 Aug 30 16:30 apm_bios
> crw-------    1 UserX   root      14,   4 Aug 30 16:30 audio
> crw-------    1 UserX   root      14,  20 Aug 30 16:30 audio1
> crw-------    1 UserX   root      14,   7 Aug 30 16:30 audioctl
> crw-------    1 UserX   root      10, 128 Aug 30 16:30 beep
> crw-------    1 UserX   root       5,   1 Jan 26 09:01 console
> crw-------    1 UserX   root      14,   3 Aug 30 16:30 dsp
> [ clipped ]

In Red Hat, the ownership of those devs is controlled by pam_console. The
first non-root user logged in a console or X will take the ownership.
Upon logging out the ownership returns to root, and other user now can
take the ownership. Check "man pam_console" for more info.

First, make sure there's no user (except root) logged in a console in the
machine your wife wants to use. (Remote login doesn't count.) If there is
no console user (of course, no X user), and the ownership still
remains to you, check (as root) if a file /var/run/console/userx exists.
If so, then it might be a stale file. Delete it, login as your wife, and
check the ownership.

Regards.

 
 
 

/dev/* ownership and groupership?

Post by Nate Warne » Thu, 31 Jan 2002 00:45:22


Thanks!  There _was_ a stale console owner file; since been removed.

Once I deleted the stale conosle user file, the sound now works for my wife
like it should, and it sort of works for me as it should:  I get an error
message telling me that I do not have permissions to /dev/dsp, rerouting to
dev/null but the sound still comes out.  I also get two start up noises, and
the sound quality is crappy (compared to my wife's account).  I did run
MAKEDEV on all the files still owned by me (prior to the stale file delete),
but I'm not sure how that might have affected it.

I'll have to do some digging on this to see what hascome up in the past; if
there isn't a solution there, I'll send in another request for help to the
group!

Thanks again!
Nate



> > [ clipped ]

> In Red Hat, the ownership of those devs is controlled by pam_console. The
> first non-root user logged in a console or X will take the ownership.
> Upon logging out the ownership returns to root, and other user now can
> take the ownership. Check "man pam_console" for more info.

> First, make sure there's no user (except root) logged in a console in the
> machine your wife wants to use. (Remote login doesn't count.) If there is
> no console user (of course, no X user), and the ownership still
> remains to you, check (as root) if a file /var/run/console/userx exists.
> If so, then it might be a stale file. Delete it, login as your wife, and
> check the ownership.

> Regards.

 
 
 

1. about /dev/dsp ownership

Hi everyone,
                I am using rh 7.2 and whenevaer a user logs in on the console/X
first time after reboot , he becomes owner of the device /dev/dsp but
the device remains owned by him  even if he logs out and other user
logs in on console/X. I want the device to be owned by the new user
logging in on the console/X after first one has logged out. These
things are done by the PAM, I guess. Can anyone help me?
thanks and regards

2. Virtual Domain?

3. /dev/dsp ownership | PAM problem

4. PCI Ethernet card installation!

5. Ownership of /dev/ttypX unchanged

6. XFree86 2.0 + ATI Ultra + Nanao F750i = blank screen

7. user ownership and group ownership

8. Drag & Drop bug?

9. /dev/tty1 ownership changes to uucp

10. /dev/tty0 ownership doesn't change on some sys?

11. /dev/sound/* files ownership not being set

12. Changing ownerships in /dev

13. Ownership of /dev/tty*: Does it change regularly?