Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

On POSIX compliant systems the permissions may be restricted by the value of the POSIX umask() function Open Group 04.

Wiki Markup
The operating system modifies the access permissions by computing the intersection of the inverse of the umask and the permissions requested by the process \[[Viega 03||AA. C References#Viega 03]\]. For example, if the variable {{requested_permissions}} contained the permissions passed to the operating system to create a new file, the variable {{actual_permissions}} would be the actual permissions that the operating system would use to create the file:

Code Block

requested_permissions = 0666;
actual_permissions = requested_permissions & ~umask();

For Linux operating systems, any created files will have mode S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH (0666), as modified by the process' umask value (see fopen(3)).

...