Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 92199 - udev-56 rules for ttyUSB should set permissions as 0660
Summary: udev-56 rules for ttyUSB should set permissions as 0660
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Greg Kroah-Hartman (RETIRED)
URL:
Whiteboard:
Keywords:
: 92958 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-05-10 15:47 UTC by Wilbur Pan
Modified: 2005-06-30 16:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix permissions for /dev/tts/USB* nodes (50-udev.rules.patch,562 bytes, patch)
2005-05-10 15:49 UTC, Wilbur Pan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wilbur Pan 2005-05-10 15:47:06 UTC
When trying to get syncing with my PDA working with udev, I found that udev creates /dev/tts/USB0 and /dev/tts/USB1 with permissions 0600.  This is probably from the current 050-udev.rules file:

KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n", GROUP="tty", MODE="0600"

This would mean that only someone running as root could sync their PDA. Users who are in the tty group would not be able to.

This should be switched to:

KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n", GROUP="tty", MODE="0660"

I did this on my system and syncing works for all users in the tty group.
Comment 1 Wilbur Pan 2005-05-10 15:49:44 UTC
Created attachment 58624 [details, diff]
Patch to fix permissions for /dev/tts/USB* nodes

Here's a patch file to fix this bug.  Hope I did this correctly.  :@)
Comment 2 SpanKY gentoo-dev 2005-05-19 12:02:12 UTC
*** Bug 92958 has been marked as a duplicate of this bug. ***
Comment 3 Timo Nentwig 2005-05-19 12:12:37 UTC
Well, I'm new to gentoo but why do I have to patch it manually and don't get 
the fix via emerge? 
 
Anyway: 
 
rules.d $ patch < /tmp/50-udev.rules 
patching file 50-udev.rules 
Hunk #1 FAILED at 41 
Comment 4 Timo Nentwig 2005-05-20 12:28:58 UTC
Well, in other words: the patch cannot be applied to udev-056. 
Comment 5 Timo Nentwig 2005-05-21 07:56:49 UTC
Well, and this cannot be fixed quickly?  
  
I put a chmod 666 /dev/null /dev/urandom /dev/pty/* in local.start.   
  
Still get /dev/ttyp3 is not the slave for the master pty on fd 3 for each 
Konsole open. 
 
..and I wonder why if should be udev's fault as this happened after an emerge 
-u world which did not update udev... 
Comment 6 Wilbur Pan 2005-05-24 18:45:06 UTC
I just did an emerge -Duv world, and it appears that udev-058 fixes this issue.

Regarding the patch, perhaps your 50-udev.rules was different than mine, for whatever reason.  I'm sure 
there's a better way to apply the change I proposed, but at this point I don't know how to do it.  One of 
these days I need to learn how to use sed.

The reason that emerge didn't apply this patch is because patches and fixes proposed in bugzilla need to 
be committed to the portage tree by a developer.  Otherwise, it's still in an experimental state.
Comment 7 Timo Nentwig 2005-05-28 07:31:09 UTC
I did the same but the problem persists. 
Comment 8 Wilbur Pan 2005-05-28 08:07:27 UTC
I'm reopening this bug.  I tried manually emerging udev-058 and checking out the
rules after the package was unpacked. The offending line comes from
/var/tmp/portage/work/udev-058/etc/udev/gentoo/udev.rules, where you can find:

KERNEL="ttyUSB[0-9]*",  NAME="tts/USB%n", GROUP="tty", MODE="0600"

I think that MODE here should be changed to be 0660 as a default.

Until this gets fixed, your best bet is to use a text editor to fix your
050-udev.rules file.  I have a feeling that the reason my system was working was
because portage did not overwrite my change.
Comment 9 Timo Nentwig 2005-06-05 07:14:40 UTC
I do have this problem as well: 
 
http://forums.gentoo.org/viewtopic-t-199447-highlight-host+key+verification.html 
 
Something's really wrong with udev, I wonder how people can actually work with 
it. 
Comment 10 Timo Nentwig 2005-06-05 07:16:27 UTC
Well, while it looks slightly different in my case:  
  
bash-2.05b$ scp bar.tar foo@server:/tmp/  
ssh_askpass: exec(/usr/lib/misc/ssh-askpass): No such file or directory  
ssh_askpass: exec(/usr/lib/misc/ssh-askpass): No such file or directory  
ssh_askpass: exec(/usr/lib/misc/ssh-askpass): No such file or directory  
Permission denied (publickey,keyboard-interactive).  
lost connection  
  
Comment 11 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-06-30 16:22:59 UTC
Fixed, will be in next release.