umask (2)
Leading comments
Copyright (c) 1980, 1991, 1993 The Regents of the University of California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the fol...
NAME
umask - set file creation mode maskLIBRARY
Lb libcSYNOPSIS
In sys/stat.h Ft mode_t Fn umask mode_t numaskDESCRIPTION
The Fn umask routine sets the process's file mode creation mask to Fa numask and returns the previous value of the mask. The 9 low-order access permission bits of Fa numask are used by system calls, including open(2), mkdir(2), and mkfifo(2), to turn off corresponding bits requested in file mode. (See chmod(2)). This clearing allows each user to restrict the default access to his files.The default mask value is S_IWGRP|S_IWOTH (022, write access for the owner only). Child processes inherit the mask of the calling process.