★ wanayoo — archive 1999 http://www.php.net/manual/function.umask.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to Filesystem
Quick Reference
German version of this pageJapanese version of this pageItalian version of this pageFrench version of this pageHungarian version of this page
Filesystem
* basename
* chgrp
* chmod
* chown
* clearstatcache
* copy
* delete
* dirname
* diskfreespace
* fclose
* feof
* fgetc
* fgetcsv
* fgets
* fgetss
* file
* file_exists
* fileatime
* filectime
* filegroup
* fileinode
* filemtime
* fileowner
* fileperms
* filesize
* filetype
* flock
* fopen
* fpassthru
* fputs
* fread
* fscanf
* fseek
* fstat
* ftell
* ftruncate
* fwrite
* set_file_buffer
* is_dir
* is_executable
* is_file
* is_link
* is_readable
* is_writeable
* link
* linkinfo
* mkdir
* pclose
* popen
* readfile
* readlink
* rename
* rewind
* rmdir
* stat
* lstat
* realpath
* symlink
* tempnam
* touch
* umask
* unlink
Manual: umask
View the source code for this pageSearch the site



Previous page
 touch
 Updated
Sat, 12 Aug 2000
unlink 
Next page


umask

(PHP3 , PHP4 )

umask -- Changes the current umask

Description

int umask (int mask)

Umask() sets PHP's umask to mask & 0777 and returns the old umask. When PHP is being used as a server module, the umask is restored when each request is finished.

Umask() without arguments simply returns the current umask.


User Contributed Notes: umask


rlynch@ignitionstate.com
11-Feb-2000 06:41
umask affects permissions when files and directories are created.

umask is short for "Un-Mask".

So umask is "and"ed with the permissions of mkdir, fopen, etc.

In a sense, the umask setting is "subtracted" from the permissions given to mkdir.

Example:

<PRE>
umask(011);
mkdir('foo', 0777);
</PRE>
will actually make a directory with permissions 0766.



wptate@olemiss.edu
29-Feb-2000 01:19
The -S option will print the symbolic values of umask, while changing the umask to the new setting.
(i.e. umask -S 007 will print 'u=rwx,g=rwx,o=')



 About Notes


Previous page
 touch
 Updated
Sat, 12 Aug 2000
unlink 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.