chmod by group, by others explain difference?

chmod by group, by others explain difference?

Post by Ken Kovl » Sat, 06 May 1995 04:00:00



Could someone explain the difference between by group and by others when
using the chmod command. The man chmod did not help on this one.
    Thanks.
--
 |  0 0 | "Keep Smiling"  //\\ Ken \\//[http://www.smart.net/~kovler]
 
 
 

chmod by group, by others explain difference?

Post by Bill Marc » Mon, 08 May 1995 04:00:00



>Could someone explain the difference between by group and by others when
>using the chmod command. The man chmod did not help on this one.
>    Thanks.

Try 'man group' and 'man newgrp'.
When you 'ls -l', you can see that each file and directory is owned by a
particular user and a particular group.  The /etc/group file lists the
groups and the users allowed to access each group, possibly with a group
password encrypted as in /etc/passwd.
--

Louisville: We've got bourbon that will knock you on your butt.

 
 
 

chmod by group, by others explain difference?

Post by Langley Stuart Jo » Tue, 09 May 1995 04:00:00



>Could someone explain the difference between by group and by others when
>using the chmod command. The man chmod did not help on this one.
>    Thanks.

Giving people group read access will allow people who have
the same group id access to your files, but not people
who are not in your group. Giving others read access
will allow people who are not in your group to read your
files.

Cheers,

Stuart
--

Stuart Langley          | "Words to memorize, words hypnotize,

Wollongong,             |  words all fail the magic prize,
Australia               |  nothing I can say when I'm in your thighs."

 
 
 

chmod by group, by others explain difference?

Post by Tye McQue » Thu, 11 May 1995 04:00:00


) Not a very clear question...please enumerate further.
)

) : Could someone explain the difference between by group and by others when
) : using the chmod command. The man chmod did not help on this one.

I think I know what Ken is asking...

In "man chmod", when it says "by owner" it means
    "by any process whose effective UID (User IDentification)
     number is the same as the UID that owns the file (as shown
     by `ls -l')".
When it says "by group", it means
    "by any process whose effective GID (Group IDentification)
     number (or one of its supplemental groups) is the same as the
     GID that owns the file (as shown by `ls -g' or `ls -l')".
When it says "by others", it means
    "by any process"

(some systems may define "by group" so that if you are "owner" you
are never "group" and "by others" so that if you are "owner" or
"group" you are never "other" -- see my last paragraph as well).

This is from "man 2 intro" on my system:

          If the effective user ID of the process is equal to the
          user  ID  of  the  owner of the file, and the requested
          access mode bit is set in the  ``owner''  bits  of  the
          mode, access is granted; otherwise access checking con-
          tinues.

          If the effective group ID (or any of the  supplementary
          group  IDs  of the process) matches the owning group of
          the file and the requested access mode bit  is  set  in
          the ``group'' bits of the mode, access is granted; oth-
          erwise, access checking continues.

          If the above checks fail, and the requested access mode
          bit is set in the ``other'' bits of the mode, access is
          granted;  otherwise,  access  is  denied   (EACCES   is
          returned).   These  checks  are performed on every com-
          ponent of the pathname, including  the  object  itself.
          If  any  of the checks fail, the privileges of the cal-
          ling process are examined to determine if  the  calling
          process  has  the  appropriate  privilege  for the mode
          requested  (P_DACREAD  for  read   and   execute/search
          access, P_DACWRITE for write access).

Some systems may replace "otherwise access checking continues"
with "otherwise permission is denied" (or I may have imagined
the existence of such systems or they may have been non-Unix
systems).  Reading more of "man 2 intro" may be informative.
---

             Nothing is obvious unless you are overlooking something