You are viewing an article about an obsolete product. Information on this page is provided as-is and not supported.

HOW TO: Preserve device permissions/settings with RealPort in Linux


Most newer Linux distribution versions and kernels now use UDEV for device creation. This means the settings applied via dgrp_cfg_node or dgrp_gui will no longer work to preserve device permissions/ownership.  For systems using UDEV all permissions are now set by UDEV, the driver dgrp_gui/dgrp_cfg_node permission settings no longer control these settings on newer kernels/distributions.

With UDEV, you can modify the permissions by modifying the RealPort UDEV script, called "10-dgrp.rules" in /etc/udev/rules.d.

Default Examples:

Here are the default entries found in /etc/udev/rules.d/10-dgrp.rules:

KERNEL="tty_dgrp*", PROGRAM="/usr/bin/dgrp_udev %k", NAME="%c"
KERNEL="cu_dgrp*", PROGRAM="/usr/bin/dgrp_udev %k", NAME="%c"
KERNEL="pr_dgrp*", PROGRAM="/usr/bin/dgrp_udev %k", NAME="%c"

Example default entries for Red Hat/CentOS EL 7.x:

KERNEL=="tty_dgrp*", PROGRAM="/usr/bin/dgrp_udev %k", SYMLINK+="%c", TAG="systemd"
KERNEL=="cu_dgrp*", PROGRAM="/usr/bin/dgrp_udev %k", SYMLINK+="%c", TAG="systemd"
KERNEL=="pr_dgrp*", PROGRAM="/usr/bin/dgrp_udev %k", SYMLINK+="%c", TAG="systemd"


The cu_dgrp devices have been deprecated for several years in Linux and are not used. Placing a hash (#) in front of this line will prevent the device creation.

The pr_dgrp devices are used for transparent/pass through printing. This is where there is a printer attached to the printer port of a terminal or PC using a tty device.

Permission Change Examples:

To change the UDEV rule syntax on the tty_dgrp* devices to set 666 permissions (typically used for getty):

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

Example for configuring printer devices on specific ports with permissions and the lp group assignment:

KERNEL=="tty_dgrp_aa_1[0-5]*", PROGRAM="/usr/bin/dgrp_udev %k", NAME="%c", GROUP="lp", MODE="0666", OPTIONS="last_rule" 

Example for configuring permissions and group for all tty devices:

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

Example for configuration permissions and groups in Red Hat/CentOS 7.x:

KERNEL=="tty_dgrp*", PROGRAM="/usr/bin/dgrp_udev %k", SYMLINK+="%c", MODE="0666", TAG="systemd", OPTIONS="last_rule"

*NOTE: The "OPTIONS="last_rule" flag is only used once in the file and is listed under the last rule entry.

Test the Permissions:

1) Run "udevcontrol reload_rules"

2) /etc/init.d/dgrp_daemon restart

Debugging UDEV:

If problems are seen with the permission/ownership/group assignments, UDEV debugging can be activated:

1) udevadm monitor

2) /etc/init.d/dgrp_daemon restart

Last updated: Jan 03, 2024

Recently Viewed

No recently viewed articles

Did you find this article helpful?