Jill Ramonsky Apr 2 2003
Subject: RE: PHP-WIN how to use umask() ???The PHP manual (unfortunately) assumes some Unix knowledge here.
The paramter to umask is a bitfield, passed as an integer. Within this bitfield:
- bit 0 set implies that anyone in the world can execute the file
- bit 1 set implies that anyone in the world can write to the file
- bit 2 set implies that anyone in the world can read the file
- bit 3 set implies that anyone in the file's group (a Unix concept) can execute the file
- bit 4 set implies that anyone in the file's group (a Unix concept) can write to the file
- bit 5 set implies that anyone in the file's group (a Unix concept) can read the file
- bit 6 set implies that the owner of the file can execute the file
- bit 7 set implies that the owner of the file can write to the file
- bit 8 set implies that the owner of the file can read the file
When accessing a file, the lower 9 bits of the permissions of the file (as stored on the server) are logically ANDed with the complement of the current "umask" - which you can set with the umask() function - and the resulting bitfield is inspected to see whether or not to grant permission for the specified action.
Jill
Jason L. Froebe
No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1
In reply to Re: umask settings in perl
by jfroebe
in thread umask settings in perl
by maxis_hap
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |