1 .\" $NetBSD: intro.2,v 1.55 2010/03/22 19:30:55 joerg Exp $
3 .\" Copyright (c) 1980, 1983, 1986, 1991, 1993
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)intro.2 8.5 (Berkeley) 2/27/95
38 .Nd introduction to system calls and error numbers
42 This section provides an overview of the system calls,
43 their error returns, and other common definitions and concepts.
45 .\".Sy System call restart
49 Nearly all of the system calls provide an error number in the external
53 is implemented as a macro which expands to a modifiable lvalue of type
56 When a system call detects an error,
57 it returns an integer value
58 indicating failure (usually \-1)
62 (This allows interpretation of the failure on receiving
63 a \-1 and to take action accordingly.)
64 Successful calls never set
66 once set, it remains until another error occurs.
67 It should only be examined after an error has been reported, because
68 otherwise a leftover value from some previous error may be found
71 Many library functions that are not system calls also set
73 on return, in the same fashion.
74 In these cases a nonzero value may be left in
76 even upon successful return if some internal action failed.
79 The manual page for each system call will list some of the common
80 errno codes that system call can return, but that should not be
81 considered an exhaustive list, i.e.
82 a properly written program should be able to gracefully recover from
83 any error that a system call might return.
84 Documenting all the error codes that a system call can return in
85 a more specification-like manner would take more resources than
86 this project has available.
88 Note also that a number of system calls overload the meanings of these
89 error numbers, and that in these cases the meanings must be
90 interpreted according to the type and circumstances of the call.
92 The following is a complete list of the errors and their
96 .It Er 0 Em "Error 0" .
98 .It Er 1 EPERM Em "Operation not permitted" .
99 An attempt was made to perform an operation limited to processes
100 with appropriate privileges or to the owner of a file or other
102 .It Er 2 ENOENT Em "No such file or directory" .
103 A component of a specified pathname did not exist, or the
104 pathname was an empty string.
105 .It Er 3 ESRCH Em "No such process" .
106 No process could be found corresponding to that specified by the given
108 .It Er 4 EINTR Em "Interrupted function call" .
109 An asynchronous signal (such as
113 was caught by the process during the execution of an interruptible
115 If the signal handler performs a normal return, the
116 interrupted function call will seem to have returned the error condition.
117 .It Er 5 EIO Em "Input/output error" .
118 Some physical input or output error occurred.
119 This error will not be reported until a subsequent operation on the same file
120 descriptor and may be lost (over written) by any subsequent errors.
121 .It Er 6 ENXIO Em "Device not configured" .
122 Input or output on a special file referred to a device that did not
124 made a request beyond the limits of the device.
125 This error may also occur when, for example,
126 a tape drive is not online or no disk pack is
128 .It Er 7 E2BIG Em "Arg list too long" .
129 The number of bytes used for the argument and environment
130 list of the new process exceeded the current limit of
131 .if t 2\u\s-218\s+2\d
136 .In sys/syslimits.h ) .
137 .It Er 8 ENOEXEC Em "Exec format error" .
138 A request was made to execute a file
139 that, although it has the appropriate permissions,
140 was not in the format required for an
142 .It Er 9 EBADF Em "Bad file descriptor" .
143 A file descriptor argument was out of range, referred to no open file,
150 request was made to a file that was
151 only open for writing (or reading).
152 .It Er 10 ECHILD Em "\&No child processes" .
157 function was executed by a process that had no existing or unwaited-for
159 .It Er 11 EDEADLK Em "Resource deadlock avoided" .
160 An attempt was made to lock a system resource that
161 would have resulted in a deadlock situation.
162 .It Er 12 ENOMEM Em "Cannot allocate memory" .
163 The new process image required more memory than was allowed by the hardware
164 or by system-imposed memory management constraints.
165 A lack of swap space is normally temporary; however,
166 a lack of core is not.
167 Soft limits may be increased to their corresponding hard limits.
168 .It Er 13 EACCES Em "Permission denied" .
169 An attempt was made to access a file in a way forbidden
170 by its file access permissions.
171 .It Er 14 EFAULT Em "Bad address" .
172 The system detected an invalid address in attempting to
173 use an argument of a call.
174 The reliable detection of this error cannot be guaranteed and when not detected
175 may result in the generation of a signal, indicating an address violation,
176 which is sent to the process.
177 .It Er 15 ENOTBLK Em "Block device required" .
178 A block device operation was attempted on a non-block device or file.
179 .It Er 16 EBUSY Em "Resource busy" .
180 An attempt to use a system resource which was in use at the time
181 in a manner which would have conflicted with the request.
182 .It Er 17 EEXIST Em "File exists" .
183 An existing file was mentioned in an inappropriate context,
184 for instance, as the new link name in a
187 .It Er 18 EXDEV Em "Improper link" .
188 A hard link to a file on another file system
190 .It Er 19 ENODEV Em "Operation not supported by device" .
191 An attempt was made to apply an inappropriate
192 function to a device,
194 trying to read a write-only device such as a printer.
195 .It Er 20 ENOTDIR Em "Not a directory" .
196 A component of the specified pathname existed, but it was
197 not a directory, when a directory was expected.
198 .It Er 21 EISDIR Em "Is a directory" .
199 An attempt was made to open a directory with write mode specified.
200 .It Er 22 EINVAL Em "Invalid argument" .
201 Some invalid argument was supplied.
202 (For example, specifying an undefined signal to a
207 .It Er 23 ENFILE Em "Too many open files in system" .
208 Maximum number of file descriptors allowable on the system
209 has been reached and a requests for an open cannot be satisfied
210 until at least one has been closed.
211 .It Er 24 EMFILE Em "Too many open files" .
212 \*[Lt]As released, the limit on the number of
213 open files per process is 64.\*[Gt]
218 resource will obtain the current limit.
219 .It Er 25 ENOTTY Em "Inappropriate ioctl for device" .
220 A control function (see
222 was attempted for a file or
223 special device for which the operation was inappropriate.
224 .It Er 26 ETXTBSY Em "Text file busy" .
225 The new process was a pure procedure (shared text) file
226 which was open for writing by another process, or
227 while the pure procedure file was being executed an
229 call requested write access.
230 .It Er 27 EFBIG Em "File too large" .
231 The size of a file exceeded the maximum.
232 (The system-wide maximum file size is
233 .if t 2\u\s-263\s+2\d
236 Each file system may impose a lower limit for files contained within it).
237 .It Er 28 ENOSPC Em "Device out of space" .
240 to an ordinary file, the creation of a
241 directory or symbolic link, or the creation of a directory
242 entry failed because no more disk blocks were available
243 on the file system, or the allocation of an inode for a newly
244 created file failed because no more inodes were available
246 .It Er 29 ESPIPE Em "Illegal seek" .
249 function was issued on a socket, pipe or
251 .It Er 30 EROFS Em "Read-only file system" .
252 An attempt was made to modify a file or directory
254 on a file system that was read-only at the time.
255 .It Er 31 EMLINK Em "Too many links" .
256 The number of hard links to a single file has exceeded the maximum.
257 (The system-wide maximum number of hard links is 32767.
258 Each file system may impose a lower limit for files contained within it).
259 .It Er 32 EPIPE Em "Broken pipe" .
260 A write on a pipe, socket or
262 for which there is no process
264 .It Er 33 EDOM Em "Numerical argument out of domain" .
265 A numerical input argument was outside the defined domain of the mathematical
267 .It Er 34 ERANGE Em "Result too large or too small" .
268 The result of the function is too large or too small to be represented
269 in the available space.
270 .It Er 35 EAGAIN Em "Resource temporarily unavailable" .
271 This is a temporary condition and later calls to the
272 same routine may complete normally.
273 .It Er 36 EINPROGRESS Em "Operation now in progress" .
274 An operation that takes a long time to complete (such as
277 was attempted on a non-blocking object (see
279 .It Er 37 EALREADY Em "Operation already in progress" .
280 An operation was attempted on a non-blocking object that already
281 had an operation in progress.
282 .It Er 38 ENOTSOCK Em "Socket operation on non-socket" .
284 .It Er 39 EDESTADDRREQ Em "Destination address required" .
285 A required address was omitted from an operation on a socket.
286 .It Er 40 EMSGSIZE Em "Message too long" .
287 A message sent on a socket was larger than the internal message buffer
288 or some other network limit.
289 .It Er 41 EPROTOTYPE Em "Protocol wrong type for socket" .
290 A protocol was specified that does not support the semantics of the
291 socket type requested.
292 For example, you cannot use the
298 .It Er 42 ENOPROTOOPT Em "Protocol option not available" .
299 A bad option or level was specified in a
304 .It Er 43 EPROTONOSUPPORT Em "Protocol not supported" .
305 The protocol has not been configured into the
306 system or no implementation for it exists.
307 .It Er 44 ESOCKTNOSUPPORT Em "Socket type not supported" .
308 The support for the socket type has not been configured into the
309 system or no implementation for it exists.
310 .It Er 45 EOPNOTSUPP Em "Operation not supported" .
311 The attempted operation is not supported for the type of object referenced.
312 Usually this occurs when a file descriptor refers to a file or socket
313 that cannot support this operation,
314 for example, trying to
316 a connection on a datagram socket.
317 .It Er 46 EPFNOSUPPORT Em "Protocol family not supported" .
318 The protocol family has not been configured into the
319 system or no implementation for it exists.
320 .It Er 47 EAFNOSUPPORT Em "Address family not supported by protocol family" .
321 An address incompatible with the requested protocol was used.
322 For example, you shouldn't necessarily expect to be able to use
327 .It Er 48 EADDRINUSE Em "Address already in use" .
328 Only one usage of each address is normally permitted.
329 .It Er 49 EADDRNOTAVAIL Em "Cannot assign requested address" .
330 Normally results from an attempt to create a socket with an
331 address not on this machine.
332 .It Er 50 ENETDOWN Em "Network is down" .
333 A socket operation encountered a dead network.
334 .It Er 51 ENETUNREACH Em "Network is unreachable" .
335 A socket operation was attempted to an unreachable network.
336 .It Er 52 ENETRESET Em "Network dropped connection on reset" .
337 The host you were connected to crashed and rebooted.
338 .It Er 53 ECONNABORTED Em "Software caused connection abort" .
339 A connection abort was caused internal to your host machine.
340 .It Er 54 ECONNRESET Em "Connection reset by peer" .
341 A connection was forcibly closed by a peer.
342 This normally results from a loss of the connection on the remote
343 socket due to a timeout or a reboot.
344 .It Er 55 ENOBUFS Em "\&No buffer space available" .
345 An operation on a socket or pipe was not performed because
346 the system lacked sufficient buffer space or because a queue was full.
347 .It Er 56 EISCONN Em "Socket is already connected" .
350 request was made on an already connected socket; or,
355 request on a connected socket specified a destination
356 when already connected.
357 .It Er 57 ENOTCONN Em "Socket is not connected" .
358 An request to send or receive data was disallowed because
359 the socket was not connected and (when sending on a datagram socket)
360 no address was supplied.
361 .It Er 58 ESHUTDOWN Em "Cannot send after socket shutdown" .
362 A request to send data was disallowed because the socket
363 had already been shut down with a previous
366 .It Er 59 ETOOMANYREFS Em "Too many references: can't splice" .
367 The resource is used up to capacity.
368 .It Er 60 ETIMEDOUT Em "Operation timed out" .
373 request failed because the connected party did not
374 properly respond after a period of time.
375 (The timeout period is dependent on the communication protocol).
376 .It Er 61 ECONNREFUSED Em "Connection refused" .
377 No connection could be made because the target machine actively
379 This usually results from trying to connect
380 to a service that is inactive on the foreign host.
381 .It Er 62 ELOOP Em "Too many levels of symbolic links" .
382 A path name lookup involved more than 32
385 .It Er 63 ENAMETOOLONG Em "File name too long" .
386 A component of a path name exceeded 255
388 characters, or an entire
389 path name exceeded 1023
390 .Pq Dv MAXPATHLEN Ns \-1
392 .It Er 64 EHOSTDOWN Em "Host is down" .
393 A socket operation failed because the destination host was down.
394 .It Er 65 EHOSTUNREACH Em "No route to host" .
395 A socket operation was attempted to an unreachable host.
396 .It Er 66 ENOTEMPTY Em "Directory not empty" .
397 A directory with entries other than
401 was supplied to a remove directory or rename call.
402 .It Er 67 EPROCLIM Em "Too many processes" .
403 .It Er 68 EUSERS Em "Too many users" .
404 The quota system ran out of table entries.
405 .It Er 69 EDQUOT Em "Disc quota exceeded" .
408 to an ordinary file, the creation of a
409 directory or symbolic link, or the creation of a directory
410 entry failed because the user's quota of disk blocks was
411 exhausted, or the allocation of an inode for a newly
412 created file failed because the user's quota of inodes
414 .It Er 70 ESTALE Em "Stale NFS file handle" .
415 An attempt was made to access an open file (on an
418 which is now unavailable as referenced by the file descriptor.
419 This may indicate the file was deleted on the
421 server or some other catastrophic event occurred.
422 .It Er 71 EREMOTE Em "Too many levels of remote in path" .
424 version 3 RPC return code 71.
425 .It Er 72 EBADRPC Em "RPC struct is bad" .
428 information was unsuccessful.
429 .It Er 73 ERPCMISMATCH Em "RPC version wrong" .
432 on the remote peer is not compatible with
434 .It Er 74 EPROGUNAVAIL Em "RPC prog. not avail" .
435 The requested program is not registered on the remote host.
436 .It Er 75 EPROGMISMATCH Em "Program version wrong" .
437 The requested version of the program is not available
440 .It Er 76 EPROCUNAVAIL Em "Bad procedure for program" .
443 call was attempted for a procedure which doesn't exist
444 in the remote program.
445 .It Er 77 ENOLCK Em "No locks available" .
446 A system-imposed limit on the number of simultaneous file
448 .It Er 78 ENOSYS Em "Function not implemented" .
449 Attempted a system call that is not available on this
451 .It Er 79 EFTYPE Em "Inappropriate file type or format" .
452 Attempted a file operation on a file of a type for which it was invalid.
453 .It Er 80 EAUTH Em "Authentication error" .
454 Attempted to use an invalid authentication ticket to mount an
457 .It Er 81 ENEEDAUTH Em "Need authenticator" .
458 An authentication ticket must be obtained before the given
460 filesystem may be mounted.
461 .It Er 82 EIDRM Em "Identifier removed" .
462 An IPC identifier was removed while the current process was waiting on it.
463 .It Er 83 ENOMSG Em "No message of the desired type" .
464 An IPC message queue does not contain a message of the desired type,
465 or a message catalog does not contain the requested message.
466 .It Er 84 EOVERFLOW Em "Value too large to be stored in data type" .
467 A numerical result of the function was too large to be stored in the
468 caller-provided space.
469 .It Er 85 EILSEQ Em "Illegal byte sequence" .
470 A wide character/multibyte character encoding error occurred.
471 .It Er 86 ENOTSUP Em "Not supported" .
472 An attempt was made to set or change a parameter to an unsupported
474 .It Er 87 ECANCELED Em "Operation canceled" .
475 The requested operation was canceled.
476 .It Er 88 EBADMSG Em "Bad or corrupt message" .
477 A message in the specified message catalog did not satisfy implementation
478 defined criteria, or a STREAMS operation encountered an invalid message or
479 a file descriptor at the STREAM head.
480 .It Er 89 ENODATA Em "No message available" .
481 No message is available on the STREAM head read queue
482 .It Er 90 ENOSR Em "No STREAM resources" .
483 Buffers could not be allocated due to insufficient STREAMs memory resources.
484 .It Er 91 ENOSTR Em "Not a STREAM" .
485 A STREAM is not associated with the specified file descriptor.
486 .It Er 92 ETIME Em "STREAM ioctl timeout" .
487 The timer set for a STREAMS
489 operation has expired.
490 .It Er 93 ENOATTR Em "Attribute not found" .
491 The specified extended attribute does not exist.
492 .It Er 94 EMULTIHOP Em "Multihop attempted" .
493 Components of path require hopping to multiple remote machines and the
494 file system does not allow it.
495 It occurs when users try to access remote resources which are not directly
497 .It Er 95 ENOLINK Em "Link has been severed" .
498 Occurs when the link (virtual circuit) connecting to a remote machine is gone.
499 .It Er 96 EPROTO Em "Protocol error" .
500 Some protocol error occurred.
501 This error is device-specific, but is generally not related to a hardware
507 Each active process in the system is uniquely identified by a non-negative
508 integer called a process ID.
509 The range of this ID is from 0 to 30000.
510 .It Parent process ID
511 A new process is created by a currently active process; (see
513 The parent process ID of a process is initially the process ID of its creator.
514 If the creating process exits,
515 the parent process ID of each child is set to the ID of a system process,
518 Each active process is a member of a process group that is identified by
519 a non-negative integer called the process group ID.
520 This is the process ID of the group leader.
521 This grouping permits the signaling of related processes (see
523 and the job control mechanisms of
526 A session is a set of one or more process groups.
527 A session is created by a successful call to
529 which causes the caller to become the only member of the only process
530 group in the new session.
532 A process that has created a new session by a successful call to
534 is known as a session leader.
535 Only a session leader may acquire a terminal as its controlling terminal (see
537 .It Controlling process
538 A session leader with a controlling terminal is a controlling process.
539 .It Controlling terminal
540 A terminal that is associated with a session is known as the controlling
541 terminal for that session and its members.
542 .It "Terminal Process Group ID"
543 A terminal may be acquired by a session leader as its controlling terminal.
544 Once a terminal is associated with a session, any of the process groups
545 within the session may be placed into the foreground by setting
546 the terminal process group ID to the ID of the process group.
547 This facility is used
548 to arbitrate between multiple jobs contending for the same terminal.
553 for more information on job control.)
554 .It "Orphaned Process Group"
555 A process group is considered to be
557 if it is not under the control of a job control shell.
558 More precisely, a process group is orphaned
559 when none of its members has a parent process that is in the same session
561 but is in a different process group.
562 Note that when a process exits, the parent process for its children
565 which is in a separate session.
566 Not all members of an orphaned process group are necessarily orphaned
567 processes (those whose creating process has exited).
568 The process group of a session leader is orphaned by definition.
569 .It "Real User ID and Real Group ID"
570 Each user on the system is identified by a positive integer
571 termed the real user ID.
573 Each user is also a member of one or more groups.
574 One of these groups is distinguished from others and
575 used in implementing accounting facilities.
576 The positive integer corresponding to this distinguished group is
577 termed the real group ID.
579 All processes have a real user ID and real group ID.
580 These are initialized from the equivalent attributes
581 of the process that created it.
582 .It "Effective User Id, Effective Group Id, and Group Access List"
583 Access to system resources is governed by two values:
584 the effective user ID, and the group access list.
585 The first member of the group access list is also known as the
587 (In POSIX.1, the group access list is known as the set of supplementary
588 group IDs, and it is unspecified whether the effective group ID is
589 a member of the list.)
591 The effective user ID and effective group ID are initially the
592 process's real user ID and real group ID respectively.
593 Either may be modified through execution of a set-user-ID or
594 set-group-ID file (possibly by one of its ancestors) (see
596 By convention, the effective group ID (the first member of the group access
597 list) is duplicated, so that the execution of a set-group-ID program
598 does not result in the loss of the original (real) group ID.
600 The group access list is a set of group IDs
601 used only in determining resource accessibility.
602 Access checks are performed as described below in
603 .Qq File Access Permissions .
604 .It "Saved Set User ID and Saved Set Group ID"
605 When a process executes a new file, the effective user ID is set
606 to the owner of the file if the file is set-user-ID, and the effective
607 group ID (first element of the group access list) is set to the group
608 of the file if the file is set-group-ID.
609 The effective user ID of the process is then recorded as the saved set-user-ID,
610 and the effective group ID of the process is recorded as the saved set-group-ID.
611 These values may be used to regain those values as the effective user
612 or group ID after reverting to the real ID (see
614 (In POSIX.1, the saved set-user-ID and saved set-group-ID are optional,
615 and are used in setuid and setgid, but this does not work as desired
618 A process is recognized as a
620 process and is granted special privileges if its effective user ID is 0.
621 .It Special Processes
622 The processes with process IDs of 0 and 1 are special.
623 Process 0 is the scheduler.
624 Process 1 is the initialization process
626 and is the ancestor (parent) of every other process in the system.
627 It is used to control the process structure.
628 The kernel will allocate other kernel threads to handle certain
629 periodic tasks or device related tasks, such as:
630 .Bl -tag -width pagedaemon
632 System accounting disk watcher, see
636 Asynchronous I/O done handler, see
642 CardBus slot watcher thread, see
645 The software crypto daemon.
647 File system snapshot thread, see
650 The in-kernel periodic flush the buffer cache to disk task,
651 which replaces the old
654 .It Sy nfsio , nfskqpoll
657 Log filesystem writer.
660 .It Sy raidX , raidioX , raid_parity , raid_recon , raid_reconip , raid_copyback
661 Raid framework related threads, see
664 SCSI bus handler, see
666 .It Sy smbiodX , smbkq
667 SMBFS handling daemon, see
670 The software data mover I/O thread, see
673 The systems monitoring framework daemon.
674 .It Sy usbX , usbtask
679 There are more machine-dependent kernel threads allocated by
681 See the specific driver manual pages for more information.
683 An integer assigned by the system when a file is referenced
688 or when a socket is created by
693 which uniquely identifies an access path to that file or socket from
694 a given process or any of its children.
696 Names consisting of up to 255
698 characters may be used to name
699 an ordinary file, special file, or directory.
701 These characters may be selected from the set of all
704 excluding 0 (NUL) and the
709 (The parity bit, bit 7, must be 0).
711 Note that it is generally unwise to use
718 file names because of the special meaning attached to these characters
722 .Tn NUL Ns -terminated
723 character string starting with an
726 followed by zero or more directory names separated
727 by slashes, optionally followed by a file name.
728 The total length of a path name must be less than 1024
732 If a path name begins with a slash, the path search begins at the
735 Otherwise, the search begins from the current working directory.
736 A slash by itself names the root directory.
737 An empty string is not a valid pathname.
739 A directory is a special type of file that contains entries
740 that are references to other files.
741 Directory entries are called links.
742 By convention, a directory contains at least two links,
751 Dot refers to the directory itself and dot-dot refers to its parent directory.
752 .It "Root Directory and Current Working Directory"
753 Each process has associated with it a concept of a root directory
754 and a current working directory for the purpose of resolving path
756 A process's root directory need not be the root
757 directory of the root file system.
758 .It File Access Permissions
759 Every file in the file system has a set of access permissions.
760 These permissions are used in determining whether a process
761 may perform a requested operation on the file (such as opening
763 Access permissions are established at the time a file is created.
764 They may be changed at some later time through the
768 File access is broken down according to whether a file may be: read,
769 written, or executed.
770 Directory files use the execute permission to control if the
771 directory may be searched.
773 File access permissions are interpreted by the system as
774 they apply to three different classes of users: the owner
775 of the file, those users in the file's group, anyone else.
776 Every file has an independent set of access permissions for
777 each of these classes.
778 When an access check is made, the system decides if permission should be
779 granted by checking the access information applicable to the caller.
781 Read, write, and execute/search permissions on
782 a file are granted to a process if:
784 The process's effective user ID is that of the super-user.
785 (Note: even the super-user cannot execute a non-executable file).
787 The process's effective user ID matches the user ID of the owner
788 of the file and the owner permissions allow the access.
790 The process's effective user ID does not match the user ID of the
791 owner of the file, and either the process's effective
792 group ID matches the group ID
793 of the file, or the group ID of the file is in
794 the process's group access list,
795 and the group permissions allow the access.
797 Neither the effective user ID nor effective group ID
798 and group access list of the process
799 match the corresponding user ID and group ID of the file,
800 but the permissions for ``other users'' allow access.
802 Otherwise, permission is denied.
803 .It Sockets and Address Families
804 A socket is an endpoint for communication between processes.
805 Each socket has queues for sending and receiving data.
807 Sockets are typed according to their communications properties.
808 These properties include whether messages sent and received
809 at a socket require the name of the partner, whether communication
810 is reliable, the format used in naming message recipients, etc.
812 Each instance of the system supports some
813 collection of socket types; consult
815 for more information about the types available and
818 Each instance of the system supports some number of sets of
819 communications protocols.
820 Each protocol set supports addresses of a certain format.
821 An Address Family is the set of addresses for a specific group of protocols.
822 Each socket has an address
823 chosen from the address family in which the socket was created.
831 manual page appeared in