LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-28-2004, 09:43 AM   #1
tomlinuxq
LQ Newbie
 
Registered: Dec 2004
Location: Houston
Distribution: Red Hat ES
Posts: 1

Rep: Reputation: 0
/dev/tty permissions changed by login


I am using Equinox SST serial port boards on a Red Hat Enterprise 3 server. I have installed the equinox drivers, and set up the ttys in /etc/inittab with entries that look like this:

1a2:2345:respawn:/sbin/agetty 19200 ttyQ1a1 wy60

Everything works fine when you login on the serial port, and my software application also works fine. The problem is with the /dev/tty permissions for "slave" printing. My software allows for "slave" printers to be attached to the ttys so you can use the terminal, and also print through the port to an attached printer.

Before I login on any port, the permissions for the /dev/tty look like this:

crw-rw-rw- 1 root root 253, 0 Dec 9 15:33 ttyQ1a1

After I login on the port, the login program (or some other one?) changes the owner, group, and permissions on the /dev/tty file. For example, if I am user "dog" then the /dev/tty file I login on looks like this after I login:

crw--w---- 1 dog tty 253, 0 Dec 21 08:33 ttyQ1a1

Notice that the owner becomes "dog", group gets changed to "tty" and the permissions are restricted. This is a problem since any other user wishing to print to the attached printer on this tty gets a permission denied error. Well, I solved that by adding the group "tty" to all my users so that while someone is logged in it works.

The real problem though is when I log off. The /dev/tty file gets changed again to :

crw------- 1 root root 253, 0 Dec 21 08:33 ttyQ1a1

Now I am really stuck since only root can use the port. Id there any way to get login, or whatever is changing these permissions to leave things alone? Or at least put things back the way they were:

crw-rw-rw- 1 root root 253, 0 Dec 9 15:33 ttyQ1a1

Thanks for your help to a newbie!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
open() failed on /dev/tty ekko37 Linux - Software 7 01-15-2005 02:47 AM
unable to change tty /dev/tty1 Read-only filesystem behmjose Linux From Scratch 1 01-02-2004 08:55 PM
remove tty files from /dev kprocter Linux - General 4 06-03-2003 04:51 PM
rxvt: can't open slave tty /dev/pts/3 kater Linux - General 2 02-26-2003 06:39 PM
login problem (/dev/tty*,ftp...) --TOL-- Linux - Newbie 6 05-23-2002 06:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration