Link to home
Start Free TrialLog in
Avatar of daanen
daanen

asked on

Creating an Account with some root permissions

Hi there,

I'm using linux to communicate with external devices by serial or parallel ports. However, I must be root or set root permissions to my prog for accessing to these io ports. What I would like is to create an account which has root permissions for io ports but not for the rest such as accessing in Write mode to system files or accessing to /root directory.

How could I do this ?
Avatar of bcoleman
bcoleman

All you have to do is change ownership and permission for the /dev/{whatever port} to the user.  What you might want to do is set up a group which have permission to access the ports and put those users who need access in that group.
alternatively, you can use 'sudo' program to explicitly grant certain user/group to run a single program/a set of programs as root.
ASKER CERTIFIED SOLUTION
Avatar of Reinier
Reinier

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of daanen

ASKER

Thanks for these answers. As I'm the unique user of my linux box, I just chmod 666 /dev/ttyS*. But in the future, I'll probably use Reinier's solution