Inspect a character device whose ls -l type indicator is c.
Do not allow ordinary users to read or write through the device.
Which statement about permissions is correct?
Device nodes have owners, groups, and mode bits. Their read/write bits control access when a process opens the device.
Detailed explanation
Incorrect. Device type does not make ordinary mode bits irrelevant.
Incorrect. Device nodes have ownership and permissions like other filesystem objects.
Correct. Owner, group, and other r/w bits control device-node access.
Incorrect. x is not the bit that grants device read/write access.
Try it yourself
An example you can run in a temporary verification environment.
ls -l /dev/null 2>/dev/null || trueExpected result
先頭cと所有者・グループ・rwx形式のモード。状態は変更しないKey points
- c means character device
- Device nodes have owner and group
- r/w control access
Notes
- Environment: Linux / /dev/nullの属性読み取りのみ
- Use a disposable file or directory when checking chmod calculations.
- Exact permission display can vary slightly with filesystem and distribution defaults.
Foundation review
Place the operation
Device type and device access permissions are separate fields; ACLs or security policies may add further controls.
Check the side effect
Inspect device-node permissions without opening or modifying hardware state.