Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
howto add +rw permission to ttyS0 for digitemp
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
jaripetteri
n00b
n00b


Joined: 26 Feb 2004
Posts: 8
Location: Tampere, Finland

PostPosted: Sat Aug 14, 2004 12:37 pm    Post subject: howto add +rw permission to ttyS0 for digitemp Reply with quote

I'm installing digitemp package but can't get it work becouse digitemp (or root) has only read permission to serial port.

Code:
lr-xr-xr-x    1 root     root            5 Aug 14 14:28 /dev/ttyS0 -> tts/0


How do I give write permission to anyone becouse root owns the file and doesn't have write permission...
_________________
Electricity is blue and it hurts...
Back to top
View user's profile Send private message
gnuageux
Veteran
Veteran


Joined: 17 Apr 2004
Posts: 1201

PostPosted: Sat Aug 14, 2004 12:39 pm    Post subject: Reply with quote

Tried chmod 667 /dev/tty ?
_________________
The realOTW: http://forums.realotw.org/index.php

Registered Linux user#364538
Back to top
View user's profile Send private message
jaripetteri
n00b
n00b


Joined: 26 Feb 2004
Posts: 8
Location: Tampere, Finland

PostPosted: Sat Aug 14, 2004 12:45 pm    Post subject: Reply with quote

yep. root owns and has only read permission...
_________________
Electricity is blue and it hurts...
Back to top
View user's profile Send private message
lbrtuk
l33t
l33t


Joined: 08 May 2003
Posts: 910

PostPosted: Sun Aug 15, 2004 2:07 am    Post subject: Reply with quote

The permissions for that are set automatically by devfs (or udev), so you'll have to edit /etc/devfsd.conf to tell it to give different permissions to the device on boot.
Back to top
View user's profile Send private message
jaripetteri
n00b
n00b


Joined: 26 Feb 2004
Posts: 8
Location: Tampere, Finland

PostPosted: Mon Aug 16, 2004 8:12 pm    Post subject: Reply with quote

hymm... what exactly I need to put or change on /etc/devfsd.conf ? 8O
_________________
Electricity is blue and it hurts...
Back to top
View user's profile Send private message
lbrtuk
l33t
l33t


Joined: 08 May 2003
Posts: 910

PostPosted: Mon Aug 16, 2004 10:08 pm    Post subject: Reply with quote

Well, for instance, adding

Code:
REGISTER        ttyS0     PERMISSIONS root.root 0666


would allow all to read or write to ttyS0.
Back to top
View user's profile Send private message
jaripetteri
n00b
n00b


Joined: 26 Feb 2004
Posts: 8
Location: Tampere, Finland

PostPosted: Tue Aug 17, 2004 6:40 am    Post subject: Reply with quote

Thanks, I'll try that. I just didn't find anything tty related on file.
_________________
Electricity is blue and it hurts...
Back to top
View user's profile Send private message
jaripetteri
n00b
n00b


Joined: 26 Feb 2004
Posts: 8
Location: Tampere, Finland

PostPosted: Tue Aug 17, 2004 6:53 pm    Post subject: Reply with quote

no. I add the line and reboot but still root doesn't have the rw permission to ttyS0...
_________________
Electricity is blue and it hurts...
Back to top
View user's profile Send private message
jaripetteri
n00b
n00b


Joined: 26 Feb 2004
Posts: 8
Location: Tampere, Finland

PostPosted: Sun Aug 22, 2004 7:37 am    Post subject: Reply with quote

I don't get it. Still no rw permission for root. Here is my /etc/devfsd.conf is it ok? What else I can try?

Code:
# Sample /etc/devfsd.conf configuration file.
# Richard Gooch  <rgooch@atnf.csiro.au>         3-JUL-2000
#
# The Gentoo Linux Team - http://www.gentoo.org/
#     - Many fixes, etc
#
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/devfsd.conf,v 1.16 2003/05/18 21:51:34 azarah Exp $

# Enable full compatibility mode for old device names. You may comment these
# out if you don't use the old device names. Make sure you know what you're
# doing!
REGISTER        .*           MKOLDCOMPAT
UNREGISTER      .*           RMOLDCOMPAT

# You may comment out the above and uncomment the following if you've
# configured your system to use the original "new" devfs names or the really
# new names
#REGISTER       vc/.*        MKOLDCOMPAT
#UNREGISTER     vc/.*        RMOLDCOMPAT
#REGISTER       pty/.*       MKOLDCOMPAT
#UNREGISTER     pty/.*       RMOLDCOMPAT
#REGISTER       misc         MKOLDCOMPAT
#UNREGISTER     misc         RMOLDCOMPAT

# You may comment these out if you don't use the original "new" names
REGISTER        .*           MKNEWCOMPAT
UNREGISTER      .*           RMNEWCOMPAT

# Enable module autoloading. You may comment this out if you don't use
# autoloading
LOOKUP          .*           MODLOAD

# Uncomment the following if you want to set the group to "tty" for the
# pseudo-tty devices. This is necessary so that mesg(1) can later be used to
# enable/disable talk requests and wall(1) messages.
#REGISTER        ^pty/s.*     PERMISSIONS -1.tty  0600
#REGISTER        ^pts/.*      PERMISSIONS -1.tty  0600
REGISTER        ttyS0     PERMISSIONS root.root 0666

# Uncomment this if you want permissions to be saved and restored
# NB: Do NOT change the following!
# Do not do this for pseudo-terminal devices
REGISTER        ^pt[sy]/.*   IGNORE
CHANGE          ^pt[sy]/.*   IGNORE
CREATE          ^pt[sy]/.*   IGNORE
DELETE          ^pt[sy]      IGNORE
REGISTER        ^log         IGNORE
CHANGE          ^log         IGNORE
CREATE          ^log         IGNORE
DELETE          ^log         IGNORE
REGISTER        .*           COPY    /lib/dev-state/$devname $devpath
CHANGE          .*           COPY    $devpath /lib/dev-state/$devname
CREATE          .*           COPY    $devpath /lib/dev-state/$devname
DELETE          .*           CFUNCTION GLOBAL unlink /lib/dev-state/$devname
RESTORE         /lib/dev-state

# You can force default like this :
# PERMISSIONS owner_and_group access_mode

# Video4Linux devices
REGISTER       v4l/.*       PERMISSIONS root.video 660

# ALSA/OSS stuff
# Comment/change these if you want to change the permissions on
# the audio devices
LOOKUP          snd          MODLOAD ACTION snd
LOOKUP          dsp          MODLOAD
LOOKUP          mixer        MODLOAD
LOOKUP          midi         MODLOAD
REGISTER        sound/.*     PERMISSIONS root.audio 660
REGISTER        snd/.*       PERMISSIONS root.audio 660

# Uncomment this to let PAM manage devfs
#REGISTER        .*           CFUNCTION /lib/security/pam_console_apply_devfsd.so pam_console_apply_single $devpath

# Autoload the sg module if generic scsi driver compiled as module.
#LOOKUP          ^sg$      MODLOAD ACTION sg

# Give the cdrw group write permissions to /dev/sg0
# This is done to have non root user use the burner (scan the scsi bus)
#REGISTER        ^scsi/host.*/bus.*/target.*/lun.*/generic    PERMISSIONS root.cdrw 660

# General note for the following auto creation of symlinks:
#
#    If you change the device that the symlink points to,
#    you should also remove the symlink before restarting
#    devfsd

# Create /dev/cdrom for the first cdrom drive
LOOKUP          ^cdrom$          CFUNCTION GLOBAL mksymlink cdroms/cdrom0 cdrom
REGISTER        ^cdroms/cdrom0$   CFUNCTION GLOBAL mksymlink $devname cdrom
UNREGISTER      ^cdroms/cdrom0$   CFUNCTION GLOBAL unlink cdrom

# Create /dev/dvd for the second cdrom drive
# (change 'cdroms/cdrom1' to suite your setup)
# NOTE: We add the fully qualified path here, else some apps
#       have problems to resolve the true device (drip comes to mind)
#LOOKUP          ^dvd$           CFUNCTION GLOBAL mksymlink ${mntpnt}/cdroms/cdrom1 dvd
#REGISTER        ^cdroms/cdrom1$  CFUNCTION GLOBAL mksymlink ${devpath} dvd
#UNREGISTER      ^cdroms/cdrom1$  CFUNCTION GLOBAL unlink dvd

# Create /dev/cdrw for the first cdrom on the scsi bus
# (change 'sr0' to suite your setup)
#LOOKUP          ^cdrw$          CFUNCTION GLOBAL mksymlink sr0 cdrw
#REGISTER        ^sr0$           CFUNCTION GLOBAL mksymlink $devname cdrw
#UNREGISTER      ^sr0$           CFUNCTION GLOBAL unlink cdrw

# Create /dev/mouse
LOOKUP          ^mouse$          CFUNCTION GLOBAL mksymlink misc/psaux mouse
REGISTER        ^misc/psaux$     CFUNCTION GLOBAL mksymlink $devname mouse
UNREGISTER      ^misc/psaux$     CFUNCTION GLOBAL unlink mouse

# Manage USB mouse
REGISTER        ^input/mouse0$   CFUNCTION GLOBAL mksymlink $devname usbmouse
UNREGISTER      ^input/mouse0$   CFUNCTION GLOBAL unlink usbmouse
REGISTER        ^input/mice$     CFUNCTION GLOBAL mksymlink $devname usbmouse
UNREGISTER      ^input/mice$     CFUNCTION GLOBAL unlink usbmouse

# Support additional config installed by packages ...
INCLUDE /etc/devfs.d

# devfsd.conf ends here


_________________
Electricity is blue and it hurts...
Back to top
View user's profile Send private message
Shark63
n00b
n00b


Joined: 16 Aug 2004
Posts: 11

PostPosted: Thu Jan 13, 2005 1:27 pm    Post subject: Reply with quote

Hey, I have run into same trouble with rw permission for serial port. I'm wondering if any of you guys solved this issue, if so, could you please advise me.

Thanks
Back to top
View user's profile Send private message
gnychis
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1004
Location: Pittsburgh, PA

PostPosted: Thu Jun 02, 2005 10:33 pm    Post subject: Reply with quote

bump

has anyone figured this out?
Back to top
View user's profile Send private message
gnychis
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1004
Location: Pittsburgh, PA

PostPosted: Fri Jun 03, 2005 4:06 am    Post subject: Reply with quote

solved it by specifying the device with:

Code:
digitemp -s /dev/ttyS0 -i


for instance :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum