[PLUG] group

Paul Heinlein heinlein at madboa.com
Mon Jan 26 14:59:02 UTC 2004


On Mon, 26 Jan 2004, Guy Noire wrote:

> >> >  [tmp]$ chmod g+ws grouptest
> >>
> >> What is this in octal??
> >
> >The problem is that octal perms are absolute, not relative.
> >Assuming that the grouptest directory originally had drwxr-xr-x
> >(0755) perms, then it'd be
> >
> >  chmod 2775 grouptest
>
>
> Aren't chmod g+ws and 2777 the same??

No. The first is relative; it will do nothing but adjust the group and
sticky bits, regardless of the original perms. It's a bitwise
operation.

The second is absolute; it'll overwrite all existing perms withe the
specified mask. No bitwise ops are needed; just rewrite the perms.

--Paul Heinlein <heinlein at madboa.com>




More information about the PLUG mailing list