|
|
| Perl Monk, Perl Meditation | |
| PerlMonks |
Comment on |
| ( #3333=superdoc: print w/ replies, xml ) | Need Help?? |
|
Perl inherited the concept of user id and group id from the Unix world, which inherited them from elsewhere. Put simply, each Unix user had a unique "user id" and a not-necessarily unique "group id". Users can belong to multiple groups. All files that the user creates are stamped with these ids. chown() changes the user id. chgrp() changes the group id.
All Unix files have protection bits, which are set when the file is created, and can be changed by chmod().
Protection bits include 3 3-bit fields. The bits represent "can read", "can write", and "can execute". The first field represents protections that apply to the owner of the file. The second field represents protections that apply to other users in the same group, and the third field represents the protections for "everyone else" (AKA "world"). Hence, a protection of
0750 There's more to it than that, but that's the basics.
In reply to Re: what is $uid and $gid?
by dws
|
|