1

I created a new ClearCase view on a Linux machine. And it was synchronized into the Windows machine where the developers work. However, I found that the permissions for the view was wrong and I modified the permission for the view using the chgrp command in Linux.

I have two questions:

  1. Is this the correct way to change permissions for the view in ClearCase in Unix?
  2. Is there a possibility to re-synchronize with Windows region after the change in permission is made?
Müller
  • 973
  • 6
  • 19
  • 38
  • chgrp as in fix_prox? I alway reprotect my views with fix_prot: https://stackoverflow.com/a/19535355/6309 – VonC Sep 28 '17 at 09:30
  • Nope. All I did was do a chgrp on the .vws directory that was created. Is this enough? – Müller Sep 28 '17 at 09:38
  • Nope: no need to fiddle with the actual folder directly: fix_prot will do what is needed. – VonC Sep 28 '17 at 09:39

2 Answers2

1

I have never changed permission on the filesystem itself (in your case, the vws view storage root folder)

If a cleartool desc -l -full -pro aview gives the wrong group, I would use fix_prot, as illustrated here.

alias sfp sudo /usr/atria/etc/utils/fix_prot

sfp -force -rec -chown <owner> -chgrp <ClearCaseUsers> -chmod 775 /path/to/viewStorage/yourView.vws
sfp -force -root -chown <owner> -chgrp <ClearCaseUsers> /path/to/viewStorage/yourView.vws

On a Windows client, I would typically do:

set CLEARCASE_PRIMARY_GROUP=aGroup
doskey fp=c:\Rational\ClearCase\etc\utils\fix_prot.exe -force -chgrp "aGroup" -chown aLogin $*
fp -rec -chmod 775 \\UNC\Path\to\view.vws
fp -root \\UNC\Path\to\view.vws
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Is it possible to re-synchronize with Windows region after modifying permissions in Linux? – Müller Sep 29 '17 at 06:34
  • 1
    @Müller Actually, you can do the same command directly in your Windows client (and with the Windows region) I have edited the answer accordingly. – VonC Sep 29 '17 at 06:36
  • Many thanks for the answer. Is there a way to set the Group permissions when creating the view on Linux? – Müller Sep 29 '17 at 08:10
  • 1
    @Müller Yes: make sure your gid main group is the one you want to be applied to your view on Linux. – VonC Sep 29 '17 at 08:12
1

Using fix_prot in this fashion (without -root) is likely not going to cause issues, but absolutely do not use fix_prot -root to reprotect a view unless there is no other choice to access its contents.

Views on unix run AS the view owner, views on Windows run impersonating the view owner. This information is stored in the .identity directory (Unix) or *.sd files (Windows). The -root option overwrites this information, which can render the view at best partially usable.

On to the questions:

  1. use the fix_prot as mentioned above, without the -root option. It will work without surprises. If you need to force a primary group before creating the view on UNix, try: newgrp {groupname} before creating the view.

  2. There is no need to resync after reprotecting the view as the group information is not in the registry. If you were to change the owner of the view, you would need to reregister it as the owner name IS in the ClearCase registry.

Brian Cowan
  • 1,048
  • 6
  • 7