other versions
- wheezy 0.4.2-1
- wheezy-backports 0.7.0-2~bpo70+2
- jessie 0.7.0-2
- testing 0.8.3-1
- unstable 0.8.3-1
STRMODE(3) | Library Functions Manual | STRMODE(3) |
NAME¶
strmode — convert inode status information into a symbolic stringLIBRARY¶
library “libbsd”SYNOPSIS¶
#include <bsd/string.h> voidstrmode(mode_t mode, char *bp);
DESCRIPTION¶
The strmode() function converts a file mode (the type and permission information associated with an inode, see stat(2)) into a symbolic string which is stored in the location referenced by bp. This stored string is eleven characters in length plus a trailingNUL
.
The first character is the inode type, and will be one of the following:
- -
- regular file
- b
- block special
- c
- character special
- d
- directory
- l
- symbolic link
- p
- fifo
- s
- socket
- w
- whiteout
- ?
- unknown inode type
- S
- If the character is part of the owner permissions and the file is not executable or the directory is not searchable by the owner, and the set-user-id bit is set.
- S
- If the character is part of the group permissions and the file is not executable or the directory is not searchable by the group, and the set-group-id bit is set.
- T
- If the character is part of the other permissions and the
file is not executable or the directory is not searchable by others, and
the ``sticky'' (
S_ISVTX
) bit is set. - s
- If the character is part of the owner permissions and the file is executable or the directory searchable by the owner, and the set-user-id bit is set.
- s
- If the character is part of the group permissions and the file is executable or the directory searchable by the group, and the set-group-id bit is set.
- t
- If the character is part of the other permissions and the
file is executable or the directory searchable by others, and the
``sticky'' (
S_ISVTX
) bit is set. - x
- The file is executable or the directory is searchable.
- -
- None of the above apply.
SEE ALSO¶
chmod(1), find(1), stat(2), getmode(3), setmode(3)HISTORY¶
The strmode() function first appeared in 4.4BSD.July 28, 1994 | Debian |