问题
I am starting to understand the issues I get during my repository synchronization between Git and ClearCase.
Let's take a look at this:
$ cd
$ touch foo && chmod 777 foo
$ ls -al foo
-rwxrwxrwx+ 1 ch52198 Domain Users 0 Sep 4 15:04 foo
$ cd /vob/view/project/
$ cp ~/foo .
$ ls -al foo
$ -rw-r----- 1 ch52198 Domain Users 0 Sep 4 15:05 foo
$ chmod u+x foo
$ ls -al foo
$ -rw-r----- 1 ch52198 Domain Users 0 Sep 4 15:05 foo
ClearCase is doing everything wrong. It ignore all the files permissions when using a MVFS storage.
Things are getting worse because if on my local Git repository I set the executable flag on a script. I will never be able to keep this flag on my ClearCase repository.
How should I fix this issue?
I tried to use cleartol protect -chmod 777 foo
, but I cannot see the permission change with Cygwin.
回答1:
For the files you have copied, you would need a cleartool protect -chmod to restore the permission.
Check also the umask
you have in your view. That will determine how the mod associated to the file is set in a ClearCase view.
See also "Access control for view-private files in dynamic views"
On Linux and the UNIX system, the initial owner, group, and protection mode for a view-private file are determined by the following rules:
- Owner. The initial owner is the user of the process that creates the file or directory.
- Group. The initial group is the primary group of the process that creates the file or directory.
- Protection mode. The initial protection mode for a view-private file depends on the umask of the user who creates the file or directory. A umask is a setting supported on Linux and the UNIX system that specifies that some permissions are not granted when the user creates a file. (For details, see the umask reference page on Linux or the UNIX system.)
When a user creates a view-private file or directory, Rational ClearCase begins with a set of permissions that depend on how the file or directory is created. The permissions specified by the user’s umask are then removed by Rational ClearCase.
For example, if the user’s umask is 002, write permission for others is removed by Rational ClearCase.
来源:https://stackoverflow.com/questions/32399127/clearcase-mvfs-files-permissions