LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 10: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 03:47 AM
unable to change tty /dev/tty1 Read-only filesystem behmjose Linux From Scratch 1 01-02-2004 09:55 PM
remove tty files from /dev kprocter Linux - General 4 06-03-2003 05:51 PM
rxvt: can't open slave tty /dev/pts/3 kater Linux - General 2 02-26-2003 07:39 PM
login problem (/dev/tty*,ftp...) --TOL-- Linux - Newbie 6 05-23-2002 07:55 AM


All times are GMT -5. The time now is 06:20 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration