How do I permanently change permissions for /dev/ttyS0?
There's no need to change system file's permissions. The serial devices have the following default permissions:
crw-rw---- 1 root dialout ... /dev/ttyS0
So all you have to do is add the user to the dialout
group:
sudo adduser $USER dialout
Solution 1: check group of ttyS0 and then assign it to your user,then relogin or su - user
crw-rw---- 1 root dialout 4, 64 feb 28 18:23 /dev/ttyS0
usermod -aG dialout youruser
su - youruser
Solution 2: if you don't like the first solution edit /etc/udev/rules.d/50-tty.rules
KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="whateveryouwant"
restart udev or reboot and of course before add your user to selected group