This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MVFS owner/group & permissions


Andrzej Ostruszka wrote:

On Mon, Mar 14 (2005), Igor Pechtchanski wrote:

First question: do you have both "ntsec" and "smbntsec" on?

Not until you've asked :). I'm not sure where it should be set so I set it in: Control_Panel->System->Advanced->Env_vars and I do see it in the subsequent shell invocations:


aao014@aao014-01 ~
$ echo "->$CYGWIN<-"
->ntsec smbntsec<-

Make sure you set it in the System Variables not the User Variables. The difference is that System Variables get set before you log in and thus this setting will be available to services that start before you log in. Note a change to the System Variables will not take effect until you reboot the system since the System environment is only build at boot time.


If you *do* have it set, does Windows show different owner and permissions via pure Windows means (i.e., the "Advanced" security properties in Windows Explorer)?

Well, if I choose the Properties item in the Windows Explorer I've got only two tabs: General and ClearCase

That's because you are looking at an element in a Dynamic view. I believe snapshot views would be like regular NTFS oriented files. But you are questioning MVFS permissions which relates to dynamic views.


and from the later I can view ClearCase properties. But what I'm really after is not in there. I have to choose in Windows Explorer not Properties but Clearcase->Properties of Element->Protection(tab) and in there I've got owner, group and other with appropriate permissions.

Yes. Clearcase permissions (i.e. Properties of Element) are the Clearcase mode (i.e. permission bits) and owner and group of the element. MVFS has it's own set of permissions and is separate from NTFS.


Still I believe with ntsec and smbntsec a Cygwin ls should show the proper owners and group which is what I suspect you want.

Basically, Cygwin can only do as much as the underlying Windows permits it to. If the underlying Windows doesn't recognize MVFS owner and attributes, it's unlikely that Cygwin will. If Windows does show the correct permissions and Cygwin doesn't (and "ntsec/smbntsec" are both on), it's probably a bug, and will have to be debugged/fixed (if it can't be
reproduced by the Cygwin developers, you'll need to help in debugging it on your machine).

If I've set the ntsec and smbntsec correctly then I guess I've got no chance to get what I wanted - am I right?

Alas, I have no Clearcase and XP anymore to do testing however I believe that if what you want is to see the owner and group from a Cygwin ls then you'll need to set ntsec and smbntsec at a minimum. While MVFS does have it's own owner and group it also does present the underlying OS with that information.


Is there a simple way to recognize the filesystem you're in?

No, not really. You could "guess" that if you are on a file system that is remote (using df) that it's an MVFS file system. But that's not guaranteed. You could check for the M drive - but that's not guaranteed either.


Besides, IIRC you should be able to get the owner/group out of ls. I doubt that the permissions will be correct. I forget now but there was something about checked out vs. not checked out and it didn't seem to follow a pattern that I thought was natural.

That way I could make a function that does normal ls and wraps e.g. the "cleartool describe" command if inside of MVFS.

Well you could always wrap ls, try the cleartool describe and check for failure, being careful to properly /dev/null that which you didn't want to see. Seems like a very heavy handed way to cripple ls though.


Will it be of any interest for the Cygwin to have some sort of plugins (so that I can write some extension which will be used e.g. for deciding the permissions of foreing filesystems).

Again, I think you would be better served to work on why you are not getting the proper owner/groups already. First take MVFS out of the picture. If another user creates a file on a share and you go to it in Cygwin and ls -l it do you see him as the owner? Is ntsec and smbntsec set? Does his user ID appear in your /etc/passwd? Once you can get that working then switch to MVFS and try again. Clearcase must offer up some owner and group to the underlying OS to display for the file.


BTW: Most people implement a trigger to change the ownership of any and all elements to that of the vob owner. This has the intended side effect of not allowing people to indiscriminately do cleartool rmelem.
--
Everywhere is walking distance if you have the time.



-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]