I think I have a "permissions" issue.
I created a new user... I didn't want to do everything in user pi, that being an intruder's first port of call. My "alternate user" will be, I hope, as powerful, mostly, so LIMITED protection, I know. But maybe "a hassle too far" for the intruder.
I then installed Lazarus on my system, as my alt user, let's call it "xyz".
And, because that was the advice, added that user as follows...
sudo adduser pi gpio
sudo adduser pi i2c
sudo adduser pi spi
I then tried to use the "basic"/ "recommended" approach to accessing the Pi's GPIO pins under Lazarus...
http://wiki.freepascal.org/Lazarus_on_R ... are_access
... which involves what appear to be, nominally, writes to files...
fileDesc := fpopen('/sys/class/gpio/gpio17/value', O_WrOnly);
gReturnCode := fpwrite(fileDesc, PIN_ON, 1);
... but the call to fpopen returned an error code which I've yet to fully decode, but the bottom line was that my attempt to "open the file" failed.
So! That's where I am. (Please let's not get too much into the pros and cons of the alternate user?) Any thoughts on the best (other) places to put my energies in hopes of finding what's blocking my path to success?
I half understand that the Raspbian file system has a wondrously complex (I mean that as praise!) system of permissions. Am I right in thinking that what a user can do depends on lots of things? Who "owns" the directory/ file concerned, for instance. On what user is asking to do things. On what groups that user belongs to.
If a GROUP has the right permission, and a user is a member of that group, the user has permission?
Do permissions get inherited by subordinate folders? (I.e. if I have write permission for the GPIO folder, do I have write permission for files in folders INSIDE gpio?
I'm not too lazy to read... any suggestions for good tutorials on permissions will be eagerly pursued.