might want to be the owner somewhere else. That will not work.  As well as any access controls imposed by the filesystem, you also need to have capability CAP_SYS_RAWIO to open the /dev/mem device.  So you do need to be setuid root (or setcap). Note that you do not need any special permissions for any of the later steps, however.  So you can start as root, open /dev/mem, drop privileges with set(res)uid, mmap just the registers you need, close the device to make it impossible to map any more, and then continue with the rest of your code safely. Thank you for the suggestions, but I don't want slow.  This is more out of principle (what others call "pig-headedness") than any real need for my LEDs to blink one million times faster than my eye can resolve.  I figure, hey, it's my computer and what's the point of having memory-mapped I/O if I can't access it as memory?  If you're going to go through several layers of condoms to protect your GPIOs, you might as well be using a mainframe and where's the fun in that? At this point I'll respectfully suggest you're looking at it the wrong way. You have two conflicting requirements, you should pick one and be done with it. Either run as root and accept that you can delete files either by using 'rm -rf /' or by scribbling the wrong stuff into /dev/mem, or run as a normal user and accept those limitations. You should