FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 12-11-2007, 05:15 PM
"Mikkel L. Ellertson"
 
Default tty permissions (was Users and Groups)

Tim wrote:
>
> Just out of curiousity, I did a "ll /dev/tty*" and saw a strange mixture
> of ownership:
>
<----------------------------[ SNIP ]--------------------------->

>
> Various "tty"s were owned by root:tty if they had a double-digit number,
> or root:root if otherwise. The "ttyS"s were owned by root:uucp (this
> box only has one or two serial ports - one's external, and I can't
> remember if there is an internal one).
>
> I know tty and ttyS aren't the same thing, but it seems an odd mixture.
>
A big part of it is that there are programs that are using
/dev/tty[0-7] and /dev/tty. These are the different virtual
consoles. Normally, if no-one if logged in, tty1 through tty6 have
mingetty running on them, running as root. In run level 5, tty7
normally will have a display manager running until someone logs in.

Try doing a command line login as a normal user, and look at the tty
that matched the VT number. It will be owned by that user that just
logged in. If you change the number of command line logins, or have
more then one X secession running, you will change the
ownership/permissions on a different number of the ttys. Ownership
can also be changed because they are being used by other programs. I
like to use a couple of ttys to display different outputs of
syslogd. They can also be handy to display the error output of a
program under test.

Now, as you noted, the /dev/ttyS* are different. These are physical
serial ports, not virtual ports. (Though there may be more device
entries then there are physical ports.) Exactly how the permissions
are set depends on the version of Fedora, and how you have
console.perms set. If you desire, you can set a serial port to be
owned by the person logged into the console. It is also possible to
have a symlink to a serial port and have the symlink managed by
console.perms.

Mikkel
--

Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-11-2007, 05:39 PM
Karl Larsen
 
Default tty permissions (was Users and Groups)

Mikkel L. Ellertson wrote:

Tim wrote:


Just out of curiousity, I did a "ll /dev/tty*" and saw a strange mixture
of ownership:



<----------------------------[ SNIP ]--------------------------->



Various "tty"s were owned by root:tty if they had a double-digit number,
or root:root if otherwise. The "ttyS"s were owned by root:uucp (this
box only has one or two serial ports - one's external, and I can't
remember if there is an internal one).

I know tty and ttyS aren't the same thing, but it seems an odd mixture.



A big part of it is that there are programs that are using
/dev/tty[0-7] and /dev/tty. These are the different virtual
consoles. Normally, if no-one if logged in, tty1 through tty6 have
mingetty running on them, running as root. In run level 5, tty7
normally will have a display manager running until someone logs in.

Try doing a command line login as a normal user, and look at the tty
that matched the VT number. It will be owned by that user that just
logged in. If you change the number of command line logins, or have
more then one X secession running, you will change the
ownership/permissions on a different number of the ttys. Ownership
can also be changed because they are being used by other programs. I
like to use a couple of ttys to display different outputs of
syslogd. They can also be handy to display the error output of a
program under test.

Now, as you noted, the /dev/ttyS* are different. These are physical
serial ports, not virtual ports. (Though there may be more device
entries then there are physical ports.) Exactly how the permissions
are set depends on the version of Fedora, and how you have
console.perms set. If you desire, you can set a serial port to be
owned by the person logged into the console.
How do you do that? I had to join the uucp Group to use /dev/ttyS0 so I
would like to know a simple way to change owner from root to karl.


Karl





It is also possible to
have a symlink to a serial port and have the symlink managed by
console.perms.

Mikkel




--

Karl F. Larsen, AKA K5DI
Linux User
#450462 http://counter.li.org.
GPG DF28 8F18 94F8 D5C6 9E44 163F 7FD1 3D06 C325 DA40

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 12-11-2007, 08:45 PM
Karl Larsen
 
Default tty permissions (was Users and Groups)

Mikkel L. Ellertson wrote:

Tim wrote:


Just out of curiousity, I did a "ll /dev/tty*" and saw a strange mixture
of ownership:



<----------------------------[ SNIP ]--------------------------->



Various "tty"s were owned by root:tty if they had a double-digit number,
or root:root if otherwise. The "ttyS"s were owned by root:uucp (this
box only has one or two serial ports - one's external, and I can't
remember if there is an internal one).

I know tty and ttyS aren't the same thing, but it seems an odd mixture.



A big part of it is that there are programs that are using
/dev/tty[0-7] and /dev/tty. These are the different virtual
consoles. Normally, if no-one if logged in, tty1 through tty6 have
mingetty running on them, running as root. In run level 5, tty7
normally will have a display manager running until someone logs in.

Try doing a command line login as a normal user, and look at the tty
that matched the VT number. It will be owned by that user that just
logged in. If you change the number of command line logins, or have
more then one X secession running, you will change the
ownership/permissions on a different number of the ttys. Ownership
can also be changed because they are being used by other programs. I
like to use a couple of ttys to display different outputs of
syslogd. They can also be handy to display the error output of a
program under test.

Now, as you noted, the /dev/ttyS* are different. These are physical
serial ports, not virtual ports. (Though there may be more device
entries then there are physical ports.) Exactly how the permissions
are set depends on the version of Fedora, and how you have
console.perms set. If you desire, you can set a serial port to be
owned by the person logged into the console. It is also possible to
have a symlink to a serial port and have the symlink managed by
console.perms.

Mikkel

After reading man console.perms it is clear that joining the uucp
Group is faster and works. The man page is short and is way over my head
in jargon, and it says do not modify consol.perms but put what you want
in console.perms.d file.


No help on what to put IN console.perms.d......

Also if others have been looking for console.perms it is in
/etc/security/ :-)





--

Karl F. Larsen, AKA K5DI
Linux User
#450462 http://counter.li.org.
GPG DF28 8F18 94F8 D5C6 9E44 163F 7FD1 3D06 C325 DA40

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




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

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org