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: File permissions different inside and outside cygwin root

Duane Ellis sent the following at Sunday, May 24, 2015 11:03 AM
>(Sorry I cannot reply directly to the previous email I just subscribed
>to the list, I am quoting from the list archive)
>>> (from the archive - permissions inside and outside of /cygwin get messed up)
>I think this is *THE* cause of my problems.
>My question is how do I turn this of 100% totally - and completely?
>How it is effecting me:
>In my case, I *OFTEN* edit source code using 'emacs-w32' under cygwin.
>and often refer to files via a filename like this
>Sadly what happens in the end is, the ACL gets set to the point where I
>cannot edit source files.
>Another common example is this:
>Step 1: On Linux - create a "tar.gz" of a source directory.
>	tar cfz  foo.tar.gz  somedirectory
>(In my case, it is an open source package that *must* build under both
>cygwin and linux) I need to move the code back and forth - to make sure
>my changes don't break things
>Step 2: Pull that tar file over to Cygwin (I use cygwin64)
>Step 3: Unpack the tar.gz file using CYGWIN
>	tar xfz
>	I specifically use "emacs-w32" - to edit the source code.
>	It seems that *randomly* the ACL gets totally bunkered
>Step 4:
>	Maybe there is a method to this madness, but I can't figure out the exact sequence
>I am *NOT* building or doing this under any Cygwin mount I should not
>need to, and I should not be required to
>I specifically use: /cygdrive/c/some/path/
>   This does not *require* the 'tar-copy' method
>   Using CYGWIN - I "git clone" some repository and edit the files in the standard way
>   It seems to be more predominant when I copy via TAR across systems.
>	I can no longer edit my source code.
>	I would end up having to "right click" permissions and fix things using windows tools
>       It seems the ACLs are totally messed up
>Bottom line, my expected behavior
>	I should be able to use a simple editor - i.e.: Emacs-w32
>	I should be able to edit a source code file
>	When I save the source code file - the permissions *before* and *after* should be identical
>	They are not, permissions are totally messed up.
>	Whatever I am seeing, it is fundamentally broken.

The following is totally a guess.  You try it at your own risk.

It is possible that the solution is in windows, not cygwin.

Windows can have security settings that propagate down a directory tree.
And when Windows and Cygwin argue, Windows wins.

- Go into Windows Explorer for C:\some or C:\some\path.
        (I advise NOT trying this on C:\.  If you do and it results
           in disaster, it is on your head.)
- Right click and select "Properties".
- Go to the "Security" tab.
- "Advanced".
- Select the account under which you use cygwin.
- "Change permissions".
- You might need to experiment on whether to check or uncheck "Include
    inheritable permissions from this object's parent".
- Check "Replace all child permissions with inheritable permissions
    from this object".
- Select the account under which you use cygwin.
- "Edit".
- "Full control".
- "OK", etc.

Or something like that.

Again, you play with the Security tab at your own risk.

Good luck,

- Barry
  Disclaimer: Statements made herein are not made on behalf of NIAID.

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