View previous topic :: View next topic |
Author |
Message |
anderiv Tux's lil' helper
Joined: 29 Mar 2004 Posts: 79
|
Posted: Mon Aug 22, 2005 1:29 pm Post subject: Allow non-root users to write to /dev/ttyS0 |
|
|
What's the easiest way to allow non-root users to write to a serial port? I've tried using chgrp/chmod to change the permissions, but it doesn't appear that the kernel will allow you to do that. Here's my info:
- kernel-2.6.7-gentoo-r11
- devfsd-1.3.25-r8 (yes I know...switching to udev isn't an option on this system)
Thanks! |
|
Back to top |
|
|
fangorn Veteran
Joined: 31 Jul 2004 Posts: 1886
|
Posted: Mon Aug 22, 2005 1:44 pm Post subject: |
|
|
AFAIK there is a "serial" group to provide this feature. Make sure youre user is in the serial group and you should be done. Or is it called "modem", no I think that was suse |
|
Back to top |
|
|
anderiv Tux's lil' helper
Joined: 29 Mar 2004 Posts: 79
|
Posted: Mon Aug 22, 2005 2:04 pm Post subject: |
|
|
fangorn wrote: | AFAIK there is a "serial" group to provide this feature. Make sure youre user is in the serial group and you should be done. Or is it called "modem", no I think that was suse |
Hrm - I have no serial group. There is a "tty" group, which I added my user to, but that didn't help. |
|
Back to top |
|
|
pmn n00b
Joined: 25 Mar 2005 Posts: 17 Location: Helsinki
|
Posted: Mon Aug 22, 2005 4:40 pm Post subject: |
|
|
What is the group that is set to /dev/ttyS0 on boot? And the mode?
I mean if the mode is 660 or similiar you should be able to write to /dev/ttyS0 by adding user to that group that 'owns' this device. (Just like fangorn said).
In my gentoo system it is "tty":
Code: | root@barton ~ $ ls -la /dev/ttyS0
lrwxrwxrwx 1 root root 5 Aug 20 14:01 /dev/ttyS0 -> tts/0
root@barton ~ $ ls -la /dev/tts/0
crw-rw---- 1 root tty 4, 64 Aug 20 14:01 /dev/tts/0
root@barton ~ $ |
After adding non-root user to group "tty" (or what it is on your system) try relogin the user. |
|
Back to top |
|
|
|