delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/10/05/01:26:32

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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=Ge3ZznEqv6vpn1dS
xu+axNvRD07hznav1S36HiNW26eVatQ6GBqmAMs+83H1/N9U/cXjluUJPDVBi+DF
UVQvCXJ9VObuB8iFoiLTy/Zr8qKPGs6L6jU4GUTpxCdjQqIK9c2Glch9iYTwySAT
/ekht/1oGfYrettGr8K+JrnmvPE=
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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=1MkWbgH2xlR7oSsO/h2SVE
UnMkY=; b=O7dqzPfzFO+Uxy8F2GjDs5w/B4/GNRFwkUtuTqMsSyCnB40cZ6IONc
1Rddr/CTQJN1opAHMt5oDARDcwI4ZY/lInIsrg123xWJmTvsT6FIzZbPUx1J/rnJ
cIFUq32vgxlw+NVt3mwefEm2/y5HBZ81jypLZe6Yh9byXHfrxDfbs=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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=-1.5 required=5.0 tests=AWL,BAYES_00,NO_DNS_FOR_FROM,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=atzeri, Atzeri, Hx-languages-length:3449, H*MI:sk:3ead440
X-HELO: butterfly.birch.relay.mailchannels.net
X-Sender-Id: wwwh|x-authuser|mitch AT houseofpain DOT org
X-Sender-Id: wwwh|x-authuser|mitch AT houseofpain DOT org
X-MC-Relay: Neutral
X-MailChannels-SenderId: wwwh|x-authuser|mitch AT houseofpain DOT org
X-MailChannels-Auth-Id: wwwh
X-MC-Loop-Signature: 1475645152295:1177981562
X-MC-Ingress-Time: 1475645152294
Subject: Re: crazy default permissions
To: cygwin AT cygwin DOT com
References: <57F48222 DOT 1030605 AT houseofpain DOT org> <3ead440c-089b-f83c-3ebf-9a4c37c09290 AT gmail DOT com>
From: Mitch Deoudes <mitch AT houseofpain DOT org>
Message-ID: <57F48ED8.5080308@houseofpain.org>
Date: Wed, 5 Oct 2016 01:25:44 -0400
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0
MIME-Version: 1.0
In-Reply-To: <3ead440c-089b-f83c-3ebf-9a4c37c09290@gmail.com>
X-AuthUser: mitch AT houseofpain DOT org
X-IsSubscribed: yes


On 10/5/2016 12:40 AM, Marco Atzeri wrote:
> On 05/10/2016 06:31, Mitch Deoudes wrote:
>> mkdir has suddenly started creating directories with strange
>> permissions.  As far as I can tell, it's related to making directories
>> nested inside other directories that were also created within cygwin.
>> As you create deeper and deeper nestings, the perms get more and more
>> screwed up.  It starts at the second level deep, with the setuid flag,
>> and eventually gets to the point where you're making directories that
>> don't even have user read/write.
>>
>> I tried this on a brand new installation of the latest cygwin64, with no
>> modifications, as of just now:
>>
>> mitch AT calculonjr ~/src/etc/rsync
>> $ umask
>> 0022
>>
>> mitch AT calculonjr ~/src/etc/rsync
>> $ mkdir baz
>>
>> mitch AT calculonjr ~/src/etc/rsync
>> $ ls -ld baz
>> drwxrwxr-x+ 1 mitch None 0 Oct  5 00:11 baz    <--- first dir looks
>> reasonable (but doesn't match umask)
>>
>> mitch AT calculonjr ~/src/etc/rsync
>> $ mkdir baz/bob
>>
>> mitch AT calculonjr ~/src/etc/rsync
>> $ ls -l baz
>> total 0
>> drwsrwsr-t+ 1 mitch None 0 Oct  5 00:11 bob    <--- second dir is weird
>>
>> mitch AT calculonjr ~/src/etc/rsync
>> $ mkdir baz/bob/foo
>>
>> mitch AT calculonjr ~/src/etc/rsync
>> $ ls -l baz/bob/
>> total 0
>> d--Srws--T+ 1 mitch None 0 Oct  5 00:12 foo   <--- third dir doesn't
>> even have user read/write
>>
>> mitch AT calculonjr ~/src/etc/rsync
>> $ mkdir baz/bob/foo/blob
>> mkdir: cannot create directory `baz/bob/foo/blob': Permission denied
>>
>>
>> Any guesses what might be causing this?  I'm pretty sure this was
>> working as of my last update, which was probably several months ago.
>>
>> mitch
>>
>>
>
> where is your home ?
>
> $ cygpath -u ~
> /home/marco
>
> and what are its ACLS ?
>
> $ cacls $(cygpath -w ~)
> E:\cygwin64\home\marco MATZERI\marco:F
>                        BUILTIN\Administrators:R
>                        Everyone:R
>                        CREATOR OWNER:(OI)(CI)(IO)F
>                        CREATOR GROUP:(OI)(CI)(IO)R
>                        Everyone:(OI)(CI)(IO)R
>
>
>
> -- 
> 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
>
>

Hmm...  in checking the acl's on my home dir, I noticed there was an 
entry for an unkown user.  Probably left over from the last time I 
migrated my data to a new windows install.  I deleted that entry via the 
Windows properties->security tab, which triggered a massive re-write of 
all the permissions for everything in my home dir.  Now mkdir seems to 
work fine.

No idea why that would cause/fix the problem.  Especially given the fact 
that said data migration happened probably years ago.  My home dir acl's 
do look a little convoluted compared to yours, though:

                     Everyone:(special access:)
                              READ_CONTROL
                              SYNCHRONIZE
                              FILE_READ_EA
                              FILE_READ_ATTRIBUTES

                     CREATOR OWNER:(OI)(CI)(IO)F
                     NT AUTHORITY\SYSTEM:(OI)(CI)F
                     calculonjr\mitch:(OI)(CI)F
                     BUILTIN\Administrators:(OI)(CI)F
                     BUILTIN\Users:(special access:)
                                   READ_CONTROL
                                   SYNCHRONIZE
                                   FILE_READ_EA
                                   FILE_READ_ATTRIBUTES

                     BUILTIN\Users:(CI)(IO)(special access:)
                                           SYNCHRONIZE
                                           FILE_WRITE_DATA
                                           FILE_APPEND_DATA

                     BUILTIN\Administrators:(ID)F
                     BUILTIN\Administrators:(OI)(CI)(IO)(ID)F
                     NT AUTHORITY\SYSTEM:(ID)F
                     NT AUTHORITY\SYSTEM:(OI)(CI)(IO)(ID)F
                     NT AUTHORITY\Authenticated Users:(ID)C
                     NT AUTHORITY\Authenticated Users:(OI)(CI)(IO)(ID)C
                     BUILTIN\Users:(ID)R
                     BUILTIN\Users:(OI)(CI)(IO)(ID)(special access:)
                                                   GENERIC_READ
                                                   GENERIC_EXECUTE


--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019