Tips for finding Knowledge Articles

  • - Enter just a few key words related to your question or problem
  • - Add Key words to refine your search as necessary
  • - Do not use punctuation
  • - Search is not case sensitive
  • - Avoid non-descriptive filler words like "how", "the", "what", etc.
  • - If you do not find what you are looking for the first time,reduce the number of key words you enter and try searching again.
  • - Minimum supported Internet Explorer version is IE9
Home  >
article

KB-9437: What is /dev/ptmx? And why does Centrify Audit need write permission?

Centrify DirectControl ,  

14 November,17 at 11:39 AM

Problem:

There was no Session in Auditor Console seen for login user and found that permission of /dev/ptmx on machine missing 'write' permission.  It's tested that adding 'w' back to permission fix the problem however would like to understand more about /dev/ptmx.

Reproduced the issue on testing machine, with changing the permission of ptmx (chmod o-w /dev/ptmx), we then get the following error message:

[root@rhel6_2 dev]# grep ptmx /var/log/centrifydc.log
Jan 12 16:27:31 rhel6_2 -bash[2391]: DEBUG: Unable to open /dev/ptmx, trying /dev/ptc
Jan 12 16:27:31 rhel6_2 -bash[2391]: ERROR: DirectAudit was unable to open either pty master /dev/ptmx or /dev/ptc, and is unable to continue with creation of subshell pty.

Workaround:

Running the command below to add the 'write' permission:
chmod o+w /dev/ptmx


The question is:

What is ptmx?  And why does Centrify Audit need write permission?


Answer:

What is ptmx:

The file /dev/ptmx is a character file with major number 5 and minor number 2, usually of mode 0666 and owner.group of root.root.
It is used to create a pseudoterminal master and slave pair.
When a process opens /dev/ptmx, it gets a file descriptor for a pseudoterminal master (PTM), and a pseudoterminal slave (PTS) device is created in the /dev/pts directory.


Why do we need write permission:

In linux platform's the default permission of "/dev/ptmx" it has write permission to all.  And DirectAudit requires write permission by the line "open("/dev/ptmx", O_RDWR)".  

More info provided as courtesy:
https://www.kernel.org/doc/Documentation/filesystems/devpts.txt

Still have questions? Click here to log a technical support case, or collaborate with your peers in Centrify's Online Community.

Related Articles

No related Articles