X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; q=dns; s=default; b=tBDa ueo1YFGZrU7plpK1/rV5ZK0QpDwyfM3LF6AKpsSLCCuuZRSZWVScx9bee+SFAz6F Ie7YYIVUB9I47rv4U1zASNSSHRMirWE9GpVqxCg5xzTdgnCCVve3Ex+nPJyHCqOL 7AyFr0qnKTRFNG45khzzVCJ8abXIBCvJWvYEVCM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; s=default; bh=I5xSdtBNwR uO/K4hpeGt2dIUvWs=; b=ZxWykoZge2e+SzqMqtGubOJ+MEpdDelt+gRG+eZKXc S2vWFwfTXD8pJrDtLasoMFxreHtwKo5MeALeR7yzu6+/DJM4wBY/VKKWB111nNVL L4QObpUeFs6YObiZ6Us2UbSkzPzZla5qFiZ6MGUIFvNSqVWlbvb1OWRDIyr+U3Cc c= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-la0-f45.google.com X-Received: by 10.153.7.138 with SMTP id dc10mr352207lad.23.1443120817559; Thu, 24 Sep 2015 11:53:37 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <56043BA4.7040405@tlinx.org> References: <560366EE DOT 5020207 AT tlinx DOT org> <56043BA4 DOT 7040405 AT tlinx DOT org> From: Greg Freemyer Date: Thu, 24 Sep 2015 14:52:57 -0400 Message-ID: Subject: Re: cygwin potentially corrupting permissions? To: Linda Walsh Cc: "cygwin AT cygwin DOT com" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes On Thu, Sep 24, 2015 at 2:06 PM, Linda Walsh wrote: > Greg Freemyer wrote: >> >> Linda, > > >> I saved your script as "lsacl.txt". Then I used "cp lsacl.txt it" to >> make a copy. >> >> The copy is permission denied for reading. Basic ls -l shows no >> difference (as expected) >> >> $ ls -l lsacl.sh it >> ----rwx---+ 1 gaf None 1630 Sep 24 12:05 it >> ----rwx---+ 1 gaf None 1630 Sep 24 12:00 lsacl.sh >> >> But your script does show a difference: >> >> $ ./lsacl.sh lsacl.sh it >> [u::---,g::---,g:root:rwx,g:Authenticated >> Users:rwx,g:SYSTEM:rwx,g:Users:r-x,m:rwx,o:---/] lsacl.sh >> [u::---,g::r-x,g:root:rwx,g:Authenticated >> Users:rwx,g:SYSTEM:rwx,g:Users:r-x,m:rwx,o:---/] it > > --- > Well user 'gaf' (that's you, from the file perms has no access). > > So up front, you are denied before anything happens. Totally logical, but not accurate. ) I am the owner of both "it" and "lsacl.sh." For both the user permissions are "---" (why I don't know. I created lsacl.sh by a simple drag and drop out of firefox.) I can cat out "lsacl.sh", but not "it". I know "chmod +rw it" gives me access to the file. The problem is Windows is creating files with permissions like lsacl.sh routinely on my system. Then when I do anything to them in cygwin, the permissions are modified to block my access. I first noticed this because I was exporting CSV files from excel, then editing them with vi from cygwin. On the first edit, all was good. After that, I no longer had permission to access the file. So, either: - Windows 7 (on 2 different machines) has started using default permissions that are bad on their face - cygwin is not properly maintaining the permissions when it manipulates a file Either way, I would really like a solution that doesn't involve a manual chmod for every file I create via the normal Windows interface and which I want to work with it in cygwin. Greg > lsacl is the embedded acl (the '+') at the end of the file perms > > u::--- = user seen by 'ls -l' has no access, g::--- = group seen by 'ls -l > has no access > g:root:rwx = group root has read/write/execute access > g:Authenticated Users:rwx == group consisting of Authenticated Users... > (after you login or provide credentials). > m:rwx m = a maximum allowed privs 'mask' for user/groups other > than owner, but since all bits are turned on, it has no limiting > effect > o:--- = other has no access > > So the main take-away is that since your 'user' has no access, pretty much > everything else is ignored. > > From the mode-bits+acl, amost anyone in the groups: > root, Authenticated Users,SYSTEM, or Users, ***except** User 'gaf' (you) > should have access... > > you might try 1) chmod u+rwx file ... > then look at both mode+acl... if you have no access > and acl still says u::---, then nuke the acl or modify it with "setfacl" > (setfacl --help)... > >> >> We seem to travel the same mailing lists. This is my first time to >> cygwin's. >> > ---- > Yeah... I wondered about that -- my Tbird tried to change my > reply addr to suse(at)tlinx based on you being the 1st address I typed > in... ;-) -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple