IBM Support

Adding more groups to a view's group list on UNIX and Linux

Question & Answer


Question

How can you add additional groups to the view's group list when using IBM® Rational® ClearCase® on UNIX® or Linux™ platforms as there is no cleartool command available to perform this operation?

Answer



The view owner can add groups to a view's group list by creating files (in the form of group.<newgroupID>) in the .identity directory located under the view storage directory.

Files inside the .identity directory define the identity under which the view_server process is running. The identity of the view_server process (view owner and groups) can be changed by modifying or adding files to the .identity directory.

Note: This is also how you can effectively remove additional groups.

If you are a member of multiple groups and you create a view, the .identity directory will contain a listing for each group that you are a member of. There is an example below under The View's group list already has additional groups.

Information on sharing a view with users in the same group
There is a utility called fix_prot, located in /opt/rational/clearcase/etc/utils, that can be used to change the permissions of a view by performing the following steps:

Note: Refer to technote 1142606 for more details on fix_prot.

  1. Login as root
  2. Run /usr/atria/etc/utils/fix_prot -r -chown owner -chgrp group -chmod 775 /physical/viewstore/pathname/view.vws
  3. A permission of uid and gid inside .identity will have to be changed as well

    cd /physical/viewstore/pathname/view.vws/.identity
    chmod 4400 uid
    chmod 2410 g*
  "Locked for all users."

Adding Groups to the View's group list

Here's how the view owner can include additional groups in the view's group list:
  1. Create a file under the .identity directory (of the view storage directory) in the form of group.<newgroupID>

    Note: The file must have certain permissions and must be owned by the new group.

  2. To ensure that the permissions of the new file are correct, copy the gid file which has correct permissions:
    1. cd <path to view storage directory>/.identity
    2. newgrp <newgroup>
    3. cp gid group.<newgroupID>

  3. Stop the view_server process that is running because only a new view_server process will pick up the new identity of the view; cleartool endview -server.


Example:
  1. % cleartool lsview -properties -full jdoe_Software
    jdoe_Software    /net/nl02tsup03/export/home/jdoe_Software.vws
    Created 18-Apr-05.17:03:17 by jdoe.rational@nl02tsup03
    Last modified 18-Apr-05.17:03:18 by jdoe.rational@nl02tsup03
    Last accessed 18-Apr-05.17:03:18 by jdoe.rational@nl02tsup03
    Last config spec update 18-Apr-05.17:03:18 by jdoe.rational@nl02tsup03
    Text mode: unix
    Properties: dynamic ucmview readwrite nshareable_dos
    Owner: rcsnl/jdoe   : rwx (all)
    Group: rcsnl/rational   : rwx (all)
    Other:                  : r-x (read)

  2. % cd /export/home/jdoe_Software.vws/.identity

  3. % ls -l
    total 0
    -r----s---   1 jdoe rational       0 Apr 18  2005 gid
    -r-S------   1 jdoe rational       0 Apr 18  2005 uid

  4. % newgrp support

  5. % id -a
    uid=14852(jdoe) gid=100(rational) groups=100(rational),17(support)

  6. Create a new file with the name group.<ID of the new group>
    % cp gid group.17

  7. % ls -l
    total 0
    -r----s---   1 jdoe rational       0 Apr 18  2005 gid
    -r----s---   1 jdoe support        0 Mar  7 12:14 group.17
    -r-S------   1 jdoe rational       0 Apr 18  2005 uid

  8. Stop the running view_server process.
    % cleartool endview -server jdoe_Software

  9. Confirm that the new view_server process has picked up the additional group:
    % cleartool lsview -properties -full jdoe_Software
    jdoe_Software    /net/nl02tsup03/export/home/jdoe_Software.vws
    Created 18-Apr-05.17:03:17 by jdoe.rational@nl02tsup03
    Last modified 18-Apr-05.17:03:18 by jdoe.rational@nl02tsup03
    Last accessed 18-Apr-05.17:03:18 by jdoe.rational@nl02tsup03
    Last config spec update 18-Apr-05.17:03:18 by jdoe.rational@nl02tsup03
    Text mode: unix
    Properties: dynamic ucmview readwrite nshareable_dos
    Owner: rcsnl/jdoe   : rwx (all)
    Group: rcsnl/rational   : rwx (all)
    Other:                  : r-x (read)
    Additional groups: rcsnl/support

Note: Removing any of the files, group.<newgroupID>, from the .identity directory will remove that group from the view's group list.

The View's group list already has additional groups

If the view owner is a member of multiple groups, then those groups will be listed as additional groups for the view:
  1. % id -a
    uid=22040(sarge) gid=20(user) groups=20(user),65536(army)

  2. % cleartool mkview -tag groups-4.1
    /net/bunker/usr4/calls/sarge/groups-4.1.vws
    Created view.
    Host-local path: bunker:/usr4/calls/sarge/groups-4.1.vws
    Global path:     /net/bunker/usr4/calls/sarge/groups-4.1.vws
    It has the following rights:
    User : sarge : rwx
    Group: user     : r-x
    Other:          : r-x


  3. % cleartool lsview -prop -full groups-4.1
    Tag: groups-4.1
    Global path: /net/bunker/usr4/calls/sarge/groups-4.1.vws
    Server host: bunker
    Region: unix_support
    Active: YES
    View tag uuid:a2c821b9.3ce811d6.bd1e.00:01:72:7b:76:ea
    View on host: bunker
    View server access path: /usr4/calls/sarge/groups-4.1.vws
    View uuid: a2c821b9.3ce811d6.bd1e.00:01:72:7b:76:ea
    View owner: sarge


    Created 21-Mar-02.11:21:12 by sarge.4294967294@bunker
    Last modified 21-Mar-02.11:21:13 by
    sarge.user@bunker
    Last accessed 21-Mar-02.11:21:13 by
    sarge.user@bunker
    Last config spec update 21-Mar-02.11:21:13 by
    sarge.user@bunker
    Text mode: unix
    Properties: dynamic readwrite shareable_dos
    Owner: atria.com/sarge : rwx (all)
    Group: atria.com/user   : r-x (read)
    Other:                  : r-x (read)

    Additional groups: army

[{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"View: Dynamic","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF015","label":"IRIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"2002.05.00;2003.06.00;7.0;7.0.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 June 2018

UID

swg21231996