/dev/mem changes permissions back to defaults on system restart!!!

Hello

Thanks for that and I have managed to copy and updated the udev rules as you stated above.

I updated the line, ~#30

SUBSYSTEM==“mem”, KERNEL==“mem|kmem|port”, GROUP=“kmem”, MODE=“0660”

restart system and checked files permissions:

/dev/mem crm-rm---- 1 root kmem 1, 1, sep 21 09:05 mem

added www-data user to the kmem group

www-data@tegra-ubuntu:~$ groups
www-data kmem

Now I run the program as www-data, but the “mem_fd = open(”/dev/mem", O_RDWR | O_SYNC)) < 0" command still fails yet works under ROOT

Any ideas why a member of the kmem group would not be able to have access to the mem file?

Thanks
Regards
Mike