How to choose Dev devices Permissions

23 Views Asked by At

In my exercise I'm supposed to write a kernel module with /dev with read only permission. In my code I have:

static DEVICE_ATTR(name_att, S_IRUSR, display, modify);

From my understanding S_IRUSR should mean there would be only read permission, so why do I get:

crw------- 1 root root

Also what is the difference between S_IRUGO and S_IRUSR?

0

There are 0 best solutions below