I'm quite new to Linux development and I'm facing some problems with permissions. Let's explain in detail: I'm using Mono to create a program which will access to serial ports and when I try to open a serial port (Virtual COM USB serial) I got an exception saying that access is restricted.
Of course there is an easy fix for this using "sudo chmod 777 /dev/ttyUSB0", but I don't thing this is the standard procedure. Since I'm planning to distribute the application as open source, I would like to avoid to create troubles for the user, so Is there any way to make this automatic for any possible port? maybe defining plocies somewhere? Is this something to do with creating distributable packages? I've used some Terminal programs which can access to any serial port without asking for permissions, so I'm pretty sure there is a way to do this.
Just for reference, I'm using USB to serial converters, so ports can change (not fixed); mine is ttyUSB0.
Please, please, please, please, I would really appreciate if someone could give me any clue on how to deal with these kind of things.
Thank you very much in advance.
SOLUTION
Despite this was asked a long time ago, I would like to write the answer to my question: The problem, as @sawdust suggested is that I didn't belong to the dialout group. So adding the current user to the dialout group fixes the problem and I can access to Serial ports after that.