Skip to contentSkip to conversation

devfs unable to handle permission: 2.4.17-pre[4,5] /

DISCUSSION Thomas Hood 3 participants 3 messages Dec 7, 2001

lore
Share & tools
lore
#0 lore raw

Some devfs permission problems may have arisen because of the fact that devfs now notifies devfsd of the creation of directories. Many people have devfsd configured to set permissions to all devices matching a certain regular expression --- e.g., all devices with "sound" in their pathname. The problem is that the "sound" directory itself matches this regular expression, and so will have its perm bits set exactly like the device files' perm bits---e.g., with the eXamine bit cleared. The solution is to edit the devfsd config so that it excludes the directory. E.g., instead of:
REGISTER sound PERMISSIONS root.audio 0664
(which worked before but won't any more) do:
REGISTER ^sound/.* PERMISSIONS root.audio 0664
or something similar.

Quoted 5 lines · Roman Zippel

Option 3:
Turn a user generated entry into a kernel generated one and return 0. Prepopulating devfs was a valid option so far, you cannot simply change this during a stable kernel release.

As Richard has pointed out, devfs is still marked "experimental", so it's not unreasonable to make changes if they are improvements.

--
Thomas Hood

#1 lore raw
Quoted 7 lines · Thomas Hood

Some devfs permission problems may have arisen because of the fact that devfs now notifies devfsd of the creation of directories. Many people have devfsd configured to set permissions to all devices matching a certain regular expression --- e.g., all devices with "sound" in their pathname. The problem is that the "sound" directory itself matches this regular expression, and so will have its perm

Quoted 8 lines

bits set exactly like the device files' perm bits---e.g., with the eXamine bit cleared. The solution is to edit the devfsd config so that it excludes the directory. E.g., instead of:
REGISTER sound PERMISSIONS root.audio 0664
(which worked before but won't any more) do:
REGISTER ^sound/.* PERMISSIONS root.audio 0664
or something similar.

Hey! Good spotting! Since the person with the problem didn't send in his devfsd configuration file, I'm guessing you ran across this problem yourself?

FYI: recent versions of devfsd now also generate synthetic REGISTER events for directories. So even with older kernels, people need to fix their config files.

				Regards,

					Richard....
Permanent: [email protected]
Current:   [email protected]
#2 lore raw
In reply to Thomas Hood

Hi,

Quoted 3 lines · Thomas Hood

As Richard has pointed out, devfs is still marked "experimental", so it's not unreasonable to make changes if they are improvements.

Sure, he can, but that's no excuse if other drivers depend on a certain behaviuor.

bye, Roman