Prevent dynamic view sharing on Windows

Having the ability to prevent users from sharing information in dynamic views may be necessary during particular projects. Prevention from deleting or modifying checkedout files and or view privates can greatly impact the workflow of the project and it users.

On UNIX® or Linux®, dynamic view sharing can be controlled through use of the operating system umask function. The file mode creation mask (often called the umask) determines the default permissions for any file created by a given process. For example, a file created by the create command on UNIX has the permissions specified by the umask unless the create command specifies explicit permissions.

Windows does not use a umask to control file creation permissions; therefore, the views cannot be configured to restrict sharing the same way it can on UNIX. The Administrator's Guide suggests using the cleartool chview command to change the read-write properties of the view, but this solution is not very flexible.

Review the ClearCase Administrator's Guide on the topic of Access Control for View and View Objects for more details.

You can make use of the undocumented -vmode feature for views.

Q: What is -vmode?

A: The -vmode switch is used to mimic the umask function on UNIX for Windows views.

By default, the permission of a view during view creation time is 775 (where the User and Group have read, write, and execute permissions). This means if a user checks out a file, other users of the same group have permissions to start that view and modify or delete the checkedout versions (or view private files).

A line such as -vmode (where is a UNIX-style numeric permissions descriptor such as 0755) can be placed in the .view file located at the root of the View's storage directory.

If the line -vmode 0755 is added as the last line to the .view file, the properties of that View will show you that 'group' no longer has write permissions.

Example:

BEFORE:
C:>cleartool lsview -prop test_view
* test_view \\Host1\ccstg_e\views\jdoe\test_view.vws
Created 15-Sep-05.17:45:50 by DOM1\jdoe.DOM1\clearuser@host1
Last modified 22-Sep-05.11:54:02 by DOM1\jdoe.DOM1\clearuser@host1
Last accessed 22-Sep-05.11:54:02 by DOM1\jdoe.DOM1\clearuser@host1
Owner: DOM1\jdoe : rwx (all)
Group: DOM1\clearuser : rwx (read)
Other: : r-x (read)

· Added -vmode 0755 to the .view file.

  • Stop the view server (cleartool endview -server test_view)
  • Start the view (cleartool startview test_view)

AFTER:
C:>cleartool lsview -prop test_view
* test_view \\Host1\ccstg_e\views\jdoe\test_view.vws
Created 15-Sep-05.17:45:50 by DOM1\jdoe.DOM1\clearuser@host1
Last modified 22-Sep-05.11:54:02 by DOM1\jdoe.DOM1\clearuser@host1
Last accessed 22-Sep-05.11:54:02 by DOM1\jdoe.DOM1\clearuser@host1
Owner: DOM1\jdoe : rwx (all)
Group: DOM1\clearuser : r-x (read)
Other: : r-x (read)

Review the ClearCase Administrator's Guide on the topic of View and VOB Access Control for more details on Protection Modes in ClearCase

No comments:

Post a Comment