[Last Call] Learn how to a build a cloud-first strategyRegister Now


tty port changing owner and permissions after reboot

Posted on 2006-06-02
Medium Priority
Last Modified: 2013-12-16
SCO OpenServer 5.0.6

My software vendor set up a serial port originally for a dumb terminal (3 years ago), but about 6 months ago I had them change the port to support a serial printer.   They made the change and everything works fine except that any time I have to reboot the box (OK, not very often), when it comes back up the port ownership and permissions change back to the following (to support a terminal)

crw-------   1 bin      terminal 120,155 Jun  2 09:12 ttyb14

I need them to stay as below to work with the printer

crw-rw-rw-   1 root     sys      120,156 Jun  2 11:02 ttyb13

What is changing it back during reboot and how can I change it to keep the correct settings?
Question by:andersen58
LVL 62

Expert Comment

ID: 16836942
Just add chown command in startup script of your program.
LVL 41

Expert Comment

ID: 17126353
see to it that during booting of the system you execute the commands:

chown root:sys /dev/ttyb13
chmod 666 /dev/ttyb13

Is possible that in inittab a getty is started?
Or during initialisation some vendor supplied script
setup these security settings.

LVL 16

Accepted Solution

Hanno P.S. earned 1000 total points
ID: 17250001
Terminal ports are frequently being changed to allow specific processes for their required permissions.
It looks like some process (a getty or something the like?) is changing the perms as soon as it gets started. Therefore, if you have a process for this port, it will change the perms avery time it starts up. In case of a getty or something else being started from inittab (with "respawn"), it will automaticall restart and reset the perms when killed (or died).

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses
Course of the Month17 days, 14 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question