[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

# Re: default file permissions

```Bart Dorsey wrote:

Maybe it would be somewhat easier to understand if you separated the
numeric / octal (e.g., 2777) representation of the sticky bits from the
alphabetic representation (e.g., rwsrwsrwt)?

Attempting to do so:

* In numeric representation, the sticky bits are represented by a 4th
octal digit (e.g., 2777 vs. 777) (notice the extra octal digit is at the
front)
* In (the binary representation of) that octal digit, the first bit
is for user, the second for group, and the last for world (IIUC)
* In the alphabetic representation, a 4th group of three letters is
*not* added, but instead the appropriate x is substituted by a t or s to
indicate the bit is set, *and*
* (IIRC) that t or s is uppercase or lowercase depending on whether
the x bit for that group is set or not (and I don't recall whether
uppercase or lowercase indicates the x bit is set, but I'd lean towards
uppercase).

regards,
Randy Kramer

>
> On Tuesday 11 May 2004 9:11 am, Antonio Rodriguez wrote:
> >
> > > BTW, the "sticky bits" are overlaid on top of these to create the extra
> > > digit...
> > >  4     2     1
> > > rwx rwx rwx
> >
> > can you be more explicit?
>
> Sure, I'll try.... the first rwx is the 4's place, the second rwx is the 2's
> place, and the third rwx is the 1's place... it's another 3 digit binary
> number overlaid on TOP of the exisiting permissions.
>
> so, "group" sticky would be.
>
> 0 1 0
>
> which gives us a 2.
>
> "user" sticky would be a 1 0 0 or,  4, this is mostly used to make stuff run
> "setuid" by another user (usually root)
>
> and "other" sticky (used by the /tmp directory..shows up as a t in the
> permissions list)  would be 0 0 1   or   1
>
> rwsrwsrwt  would be what it would look like at 7777
>
> I hope that makes more sense.
>
> >
> > > so group sticky would be 2777 in this example... and it prints as
> > >
> > > rwx rws rwx
> >
> > Very unclear. Thank you for allowing me to (ab)use your good disposition.
>
> --
> To UNSUBSCRIBE, email to debian-kde-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

```