What are the differences in attributes of ttyS0 and ttyUSB0?
(baud, parity, start-stop bits, etc.).
Ownership and permissions (and SELinux) also matter.
I can use both since my regular user is a member of the dialout group.
Code:
$ ls -l /dev/ttyS0 /dev/ttyUSB0
crw-rw----. 1 root dialout 4, 64 Dec 13 11:07 /dev/ttyS0
crw-rw----+ 1 USER dialout 188, 0 Dec 16 09:50 /dev/ttyUSB0
Does your program run either as root or as a user which is a member of the dialout group? The program may need to execute 'suid'.