public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Buchbinder, Barry (NIH/NIAID) [E]" <BBuchbinder@niaid.nih.gov>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Cc: 'Duane Ellis' <duane@duaneellis.com>
Subject: RE: File permissions different inside and outside cygwin root
Date: Mon, 01 Jun 2015 18:44:00 -0000	[thread overview]
Message-ID: <6CF2FC1279D0844C9357664DC5A08BA2109EFF1F@msgb09.nih.gov> (raw)
In-Reply-To: <E087F37F-5AAF-4526-B6B8-091D8F9FDC20@duaneellis.com>

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
>/cygdrive/c/some/path/foo.c
>
>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 foo.bar.tz
>
>	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/
>
>**NOTE**
>   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
>
>Result:
>       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.

  reply	other threads:[~2015-06-01 18:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-24 16:30 Duane Ellis
2015-06-01 18:44 ` Buchbinder, Barry (NIH/NIAID) [E] [this message]
2015-06-02  0:01   ` Steven Penny
2015-06-02  7:00     ` Yaakov Selkowitz
2015-06-02 12:58       ` Buchbinder, Barry (NIH/NIAID) [E]
2015-06-02 14:53         ` Duane Ellis
2015-06-05  3:53           ` Larry Hall (Cygwin)
  -- strict thread matches above, loose matches on Subject: below --
2015-05-21 13:05 DeTracey, Brendan
2015-05-22  1:32 ` Steven Penny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6CF2FC1279D0844C9357664DC5A08BA2109EFF1F@msgb09.nih.gov \
    --to=bbuchbinder@niaid.nih.gov \
    --cc=cygwin@cygwin.com \
    --cc=duane@duaneellis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).