Operating System - HP-UX
1825768 Members
2822 Online
109687 Solutions
New Discussion

Re: what is the default permission for /dev/pts/* ?

 
Rajesh SB
Esteemed Contributor

what is the default permission for /dev/pts/* ?

Hi Experts,

What is the default permission for device files /dev/pts/* in normally?

On one of server /dev/pts/* files permissions has changed.

Thanks in advance.

Regards,
Rajesh
6 REPLIES 6
V.Tamilvanan
Honored Contributor

Re: what is the default permission for /dev/pts/* ?

Hi,

crw-rw-rw- 1 root sys 33 0x000010 Aug 21 2002 tq

Robert-Jan Goossens
Honored Contributor

Re: what is the default permission for /dev/pts/* ?

Hi Rajesh,

Default permissions 666 for /dev/pts/*

Regards,

Robert-Jan.
Umapathy S
Honored Contributor

Re: what is the default permission for /dev/pts/* ?

Rajesh,
I see a different pattern. If the pts is opened by a user, the permissions change.

In 10.2
crw-rw-rw- 1 root root
crw--w---- 1

In 11
crw-rw-rw- 1 root root
crw--w--w-

In 11i
crw-rw-rw- 1 root sys
crw--w---- 1

HTH,
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
yogesh_4
Regular Advisor

Re: what is the default permission for /dev/pts/* ?

HI Rajesh,
Default permissions for /dev/pts/* is 666
Mike Stroyan
Honored Contributor

Re: what is the default permission for /dev/pts/* ?

It is normal for an rlogin or dtterm or gnome-terminal to change the ownership and permissions of ptys. There is actually a utility libc function that does it.
===========================================================
% man grantpt

grantpt(3C) grantpt(3C)

NAME
grantpt - grant access to the STREAMS slave pty

SYNOPSIS
int grantpt (int fildes);

DESCRIPTION
The passed parameter, fildes, is a file descriptor that is returned
from a successful open of a STREAMS master pty (pseudo-terminal)
device. The grantpt() function modifies the ownership and mode of the
slave pty device special file associated with its master pty
counterpart.

A setuid() root program is spawned to change ownership and mode of the
pty slave device file in the following way: The group ID is set to a
reserved group named "tty". The slave user ID is set to the effective
owner of the calling process. The permissions of the slave device are
set so that the owner is allowed read and write access and the group
is allowed write access.

GK_5
Regular Advisor

Re: what is the default permission for /dev/pts/* ?

10.2
crw-rw-rw- for root
crw--w---- for all other users

11.00
crw-rw-rw- for root
crw--w--w- for all other users

11.11
crw-rw-rw- for root
crw--w---- for all other users
IT is great!