Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Who sets perms on /dev/ttyp* files?
@ 1996-08-05  4:00 Randy Marchany
  1996-08-05  4:00 ` Paul B. Henson
  1996-08-07  4:00 ` Tim Mooney
  0 siblings, 2 replies; 4+ messages in thread
From: Randy Marchany @ 1996-08-05  4:00 UTC (permalink / raw)



 We're running Dec Unix 3.2c and have run across a little problem. Our
umask is set 7077 and we've noticed that when someone logs in, the perms
for their ttyp files are 620. Example:

crw--w----   1 marchany terminal   6,    1 Aug  5 14:22 ttyp1
crw--w----   1 william  terminal   6,    2 Aug  5 14:21 ttyp2

Since we belong to the same group, I can delete his ttyp2 file and log
him out and he can do the same to me. So, my question is:
who controls the umask setting for these files? My default umasks are
7077 which should give me 0700 perms on the files. What part of the OS
set the group perms to write access?

This appears to be a default problem with DEC Unix. We've checked a
number of DEC boxes here and at other sites and this shows up on all of
them.

Needless to say, my users have discovered this 'feature'.


TIA

	-Randy Marchany
	VA Tech Computing Center
	Blacksburg, VA 24060



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Who sets perms on /dev/ttyp* files?
  1996-08-05  4:00 Who sets perms on /dev/ttyp* files? Randy Marchany
@ 1996-08-05  4:00 ` Paul B. Henson
  1996-08-06  4:00   ` Brian Martin
  1996-08-07  4:00 ` Tim Mooney
  1 sibling, 1 reply; 4+ messages in thread
From: Paul B. Henson @ 1996-08-05  4:00 UTC (permalink / raw)



Randy Marchany (marchany@vtserf.cc.vt.edu) wrote:
:  We're running Dec Unix 3.2c and have run across a little problem. Our
: umask is set 7077 and we've noticed that when someone logs in, the perms
: for their ttyp files are 620. Example:
: crw--w----   1 marchany terminal   6,    1 Aug  5 14:22 ttyp1
: crw--w----   1 william  terminal   6,    2 Aug  5 14:21 ttyp2
: Since we belong to the same group, I can delete his ttyp2 file and log

Unless you're both in the "terminal" group, I don't see the problem. The
group write for the listing you've shown here is only for the terminal
group. If you two share other groups in common, it shouldn't allow you to
delete each others ttys.

--
Paul Henson  |  System Administrator  |  Cal Poly Pomona  |  (909) 869-3781
pbhenson@csupomona.edu | finger henson@brick.dce.csupomona.edu for PGP key



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Who sets perms on /dev/ttyp* files?
  1996-08-05  4:00 ` Paul B. Henson
@ 1996-08-06  4:00   ` Brian Martin
  0 siblings, 0 replies; 4+ messages in thread
From: Brian Martin @ 1996-08-06  4:00 UTC (permalink / raw)



Paul B. Henson wrote:
> 
> Randy Marchany (marchany@vtserf.cc.vt.edu) wrote:
> :  We're running Dec Unix 3.2c and have run across a little problem. Our
> : umask is set 7077 and we've noticed that when someone logs in, the perms

you may want to check out the man page on umask and figure out exactly
why in Oort's name you are using a umask of 7077 and not 022.  Your
directory permissions may be suffering as a result.  'Course, your
system _could_ be different, but I seem to recall 666 is the default
on files and 777 on directories.  check the man pages, safest bet.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Who sets perms on /dev/ttyp* files?
  1996-08-05  4:00 Who sets perms on /dev/ttyp* files? Randy Marchany
  1996-08-05  4:00 ` Paul B. Henson
@ 1996-08-07  4:00 ` Tim Mooney
  1 sibling, 0 replies; 4+ messages in thread
From: Tim Mooney @ 1996-08-07  4:00 UTC (permalink / raw)



In article <4u5fc9$3g3@solaris.cc.vt.edu>,
Randy Marchany <marchany@vtserf.cc.vt.edu> wrote:
>  We're running Dec Unix 3.2c and have run across a little problem. Our
> umask is set 7077 and we've noticed that when someone logs in, the perms
> for their ttyp files are 620. Example:
> 
> crw--w----   1 marchany terminal   6,    1 Aug  5 14:22 ttyp1
> crw--w----   1 william  terminal   6,    2 Aug  5 14:21 ttyp2
> 
> Since we belong to the same group, I can delete his ttyp2 file and log
> him out and he can do the same to me. 

Huh?

1) Being able to delete a file isn't controlled by the permissions on the
file, it's controlled by the permissions on the directory the file resides
in.  If normal users are able to delete terminal files it's because of the
permissions on /dev or /dev/pts, not because of permissions on the terminal
files themselves.

2) Normal users should not be part of the `terminal' group.  You seem to
be implying that all your users belong to the terminal group.  I hope that
isn't the case.

3) Based on the listing you show above, you have another security problem on
your system.   If you have access to DEC support, get DEC's list of patches
for 3.2c and scan for `security'.  You'll find the patch I'm alluding to and
installing it will circumvent another (probably bigger) security problem.

> So, my question is:
> who controls the umask setting for these files? My default umasks are
> 7077 which should give me 0700 perms on the files.

1) You don't want a umask of 7077.  077 maybe, but not 7077.

2) umask only controls permissions on files you create.  Since those
/dev/ttyp? files already exist, the permissions on them are not affected
by your umask.  Permissions on the /dev/ttyp? file (and any files linked to
it) are changed via chown() by some program (e.g. login) when you log in.

3) As I've explained, having `w' permission on a tty file isn't your problem, 
but if you want to turn that permission off, take a look at the man page for
`mesg'.  Adding

	mesg n

to /etc/profile will remove `w' permission for all people that use a sh-like
shell, unless they run

	mesg y

in their shell init files.  That's not going to fix the problem you're most
concerned with though.

> What part of the OS
> set the group perms to write access?

login, or a similar process (dtlogin uses Xstartup & Xreset, xdm uses
GiveConsole and TakeConsole, etc).
  
> This appears to be a default problem with DEC Unix. We've checked a
> number of DEC boxes here and at other sites and this shows up on all of
> them.

Try installing the security patch I alluded to above and see if it fixes it.
  
> Needless to say, my users have discovered this 'feature'.

If 

	rm /dev/ttyp1

works for a normal user then so does

	rm /dev/null

or whatever.  This means you have more problems than you think.

Tim
-- 
Tim Mooney                              mooney@toons.cc.ndsu.NoDak.edu
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J1, IACC Bldg.                 (701) 231-8541 (FAX)
North Dakota State University, Fargo, ND 58105



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1996-08-07  4:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-08-05  4:00 Who sets perms on /dev/ttyp* files? Randy Marchany
1996-08-05  4:00 ` Paul B. Henson
1996-08-06  4:00   ` Brian Martin
1996-08-07  4:00 ` Tim Mooney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox