change the ownership of a view on UNIX and Linux

Note: Before changing the view permissions, be sure to uncheckout any elements and backup the view to maintain a history of the view-private files to avoid any problems that may occur if a restore is required.

a) Terminate the view server process by running:

cleartool endview -server

b) su to root and run the fix_prot command as follows:

fix_prot -r -chown

c) Check the .identity directory of the view storage to ensure the setuid/setgid bit (sticky bit) is applied:

INCORRECT PERMISSIONS:
~# cd /test.vws/.identity
~# ls -al
total 8
drwxrwxr-x 2 user2 ccusers 4096 Sep 25 05:02 .
drwxrwxr-x 6 user2 ccusers 4096 Sep 25 10:08 ..
-r----x--- 1 user2 ccusers 0 Sep 14 17:24 gid
-r-------- 1 user2 ccusers 0 Sep 14 17:24 uid


d) Modify the permissions on the gid and uid files if needed:

chmod 2410 gid

chmod 4400 uid

CORRECT PERMISSIONS
~# cd /home/jdoe/test.vws/.identity
~# ls -al
total 8
drwxrwxr-x 2 user2 ccusers 4096 Sep 25 05:02 .
drwxrwxr-x 6 user2 ccusers 4096 Sep 25 10:08 ..
-r----s--- 1 user2 ccusers 0 Sep 14 17:24 gid
-r-S------ 1 user2 ccusers 0 Sep 14 17:24 uid


At this point all the view file system objects have been reprotected and will reflect the ACL of the new owner.

No comments:

Post a Comment