Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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
(protections are almost always writen in octal) means that the owner can read, write, and execute the file (the 0700 part); members of the group and read and execute the file(the 050 part), and the rest of the world can do nothing (the 0 part at the end).

There's more to it than that, but that's the basics.

In reply to Re: what is $uid and $gid? by dws
in thread what is $uid and $gid? by Anonymous Monk

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others making s'mores by the fire in the courtyard of the Monastery: (6)
    As of 2018-06-23 12:50 GMT
    Find Nodes?
      Voting Booth?
      Should cpanminus be part of the standard Perl release?

      Results (125 votes). Check out past polls.