Digiboard Port Server changes tty device permissions

Dumb terminals haven't quite disappeared from the earth yet. I still have customers using these, though today they are almost always connected over TCP/IP using something like Digiboard Portservers.

Earlier this week, one of those customers called with a problem of changing perms on his /dev/tty* devices. He needs them set with write permission (666), but some were seemingly randomly resetting to 600.

My first thought was that perhaps the users themselves were doing this with "mesg":


$ who am i
pcunix   pts/0        2010-11-22 21:17 (209.237.150.152)
$ ls -l /dev/pts/0
crw--w---- 1 pcunix tty 136, 0 Nov 22 21:18 /dev/pts/0
$ mesg n
$ ls -l /dev/pts/0
crw------- 1 pcunix tty 136, 0 Nov 22 21:18 /dev/pts/0
$ mesg y
$ ls -l /dev/pts/0
crw--w---- 1 pcunix tty 136, 0 Nov 22 21:19 /dev/pts/0
 

That wasn't it, though. For one thing, "mesg" never appeared in any users history, and - more importantly - all the ttys on a specific Digi Portserver would change (for example, all /dev/ttyz* devices would be affected).

A bit of retrospection and log digging made the customer think that this happened whenever there was a power interruption at the store where the Portserver affected was intalled. A quick test confirmed that: lose power and the Digis lose their perms.

That had to be something to do with Digi itself. Digi has a file "/etc/udev/rules.d/10-dgrp.rules" that can specify device perms with a MODE command (MODE="0666") but that didn't seem to work.

I sent him to Digi support at that point and they provided the answer. Apparently you need to add OPTIONS="last_rule" in addition to the MODE setting. The line ends up looking something like this:

KERNEL=="tty_dgrp*", PROGRAM="/usr/bin/dgrp_udev %k", NAME="%c,
 GROUP="lp", MODE="0666", OPTIONS="last_rule"
 

That fixed it.



Got something to add? Send me email.





(OLDER) <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> -> Access permission of the /dev/tty* files changes from 666 to 600



Increase ad revenue 50-250% with Ezoic


More Articles by

Find me on Google+

© Anthony Lawrence



Kerio Samepage


Have you tried Searching this site?

Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us





As soon as an Analytical Engine exists, it will necessarily guide the future course of the science. Whenever any result is sought by its aid, the question will then arise — by what course of calculation can these results be arrived at by the machine in the shortest time? (Charles Babbage)





This post tagged: