My solution (ArchLinux ARM on RaspberryPi) requires that a non-privileged user has to have access to the /dev/ttyAMA0 port. In final implementation that user will be automatically logged in and a start-up script would be launched, but that is off-topic.The problem is that the /dev/ttyAMA0 port (owned by root:tty) has 0620 permissions, and though the non-privileged user is put in the tty group, the file permissions do not give him read access, and that is not good enough.In this thread I was told I should use /etc/tmpfiles.d feature to fix the permissions. However, adding a /etc/tmpfiles.d/solution.conf file with one lineF /dev/ttyAMA0 0660 root ttydoes not change a thing. Perhaps I am not using the tmpfiles.d feature correctly.
Changing the /dev/tty* permissions at startup
permissions;arch linux;devices;startup
It turns out that this problem was specific to RaspberryPi, since the /dev/ttyAMA0 serial port that's linked to the hardware GPIO pins by default is initialized for virtual console access.I had to remove any reference to /dev/ttyAMA0 in /boot/cmdline.txt, reboot, and the /dev/ttyAMA0 now was with proper group permissions (read+write), however the group name now was uucp. What is not problem, of course, to put my user in that group.Had I wanted to change the ownership of /dev/ttyAMA0 or permissions, that could be done via editing the rule files in the /usr/lib/udev/rules.d directory.