[SunHELP] Group memberships.

Ajit P. Datey adatey at yahoo.com
Tue Oct 29 11:40:43 CST 2002


RE: [SunHELP] Group memberships.Hi! Thanks a lot. Setting the group bit on the
directory was the key.

Ajit
  ----- Original Message -----
  From: Donaldson, Mark
  To: 'Ajit P. Datey' ; sunhelp at sunhelp.org
  Sent: Tuesday, October 29, 2002 12:14 PM
  Subject: RE: [SunHELP] Group memberships.


  By default, Solaris makes new files with the group ownership the same as the
primary group (the GID in /etc/passwd) of the file creator.  If you SUID the
directory, it'll adopt the standard that new files are created with the group
ownership of the parent directory:

  Check out this example below...  Using this "feature" may mean the person
has to change is group less.  Making a file in each groups' directory will
make ownership appropriate for that group.  Reading & altering already created
files should require no need to switch groups as the user should exist in both
groups simultaneously.

  $ ls -la
  total 8
  drwxr-xr-x    2 mdonalds opsprod      4096 Oct 29 10:10 .
  drwxr-xr-x    5 mdonalds bin          4096 Oct 29 10:10 ..
  $
  $ touch testfile1
  $ ls -la
  total 8
  drwxr-xr-x    2 mdonalds opsprod      4096 Oct 29 10:11 .
  drwxr-xr-x    5 mdonalds bin          4096 Oct 29 10:10 ..
  -rw-r--r--    1 mdonalds wheel           0 Oct 29 10:11 testfile1
  $ chmod g+s .
  $ touch testfile2
  $ ls -la
  total 8
  drwxr-sr-x    2 mdonalds opsprod      4096 Oct 29 10:11 .
  drwxr-xr-x    5 mdonalds bin          4096 Oct 29 10:10 ..
  -rw-r--r--    1 mdonalds wheel           0 Oct 29 10:11 testfile1
  -rw-r--r--    1 mdonalds opsprod         0 Oct 29 10:11 testfile2

  -----Original Message-----
  From: Ajit P. Datey [mailto:adatey at yahoo.com]
  Sent: Tuesday, October 29, 2002 7:16 AM
  To: sunhelp at sunhelp.org
  Subject: [SunHELP] Group memberships.



  Hi! I have a user who is a member of two groups. The user accesses/creates
  directories and files under both permissions. The user is getting frustrated
  with the frequency with which he has to use the newgrp command. Is there a
way
  in which he can do his work without having to use the newgrp command so
  frequently? Is there a way to set things that the OS recognizes your group
  memberships and you are able to work without having to use newgrp to change
  your group?

  I cannot set world permissions in the areas where the user is working. Also
I
  cannot combine the files/dirs into one group since they belong to different
  departments.

  Thanks a lot.

  Regards
  Ajit
  _______________________________________________
  SunHELP maillist  -  SunHELP at sunhelp.org
  http://www.sunhelp.org/mailman/listinfo/sunhelp



More information about the SunHELP mailing list