APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Digiboard Port Server changes tty device permissions

© November 2010 Anthony Lawrence

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 (
$ 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

Inexpensive and informative Apple related e-books:

Take control of Apple TV, Second Edition

Digital Sharing Crash Course

Photos for Mac: A Take Control Crash Course

Take Control of Parallels Desktop 12

Photos: A Take Control Crash Course

More Articles by © Anthony Lawrence

Printer Friendly Version

Have you tried Searching this site?

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

Printer Friendly Version

We must be very careful when we give advice to younger people: sometimes they follow it! (Edsger W. Dijkstra)

Linux posts

Troubleshooting posts

This post tagged:






Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode