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=GdlCZs80It9a8wHa bwrn01xjK7q0pfZ15Xqj5HiNI9fDLH9R/bvV+xynFyUg1qRqk56PhIvHI+jhx6YK 4cfp39aijAHZdG0cgMcddj5DpHSd4Qf+o8p1Obn2qOe5K6TnJ9n2el7YdOa4No6n zi9zmobUNIG28mziGFYTu2GImvM= 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=eNbPJJHN+neBiEJpMtKQsO FRIV0=; b=MbK3DVGKggCLUQDG3Jlx5d70T3gls1Y8gMEjEwGTCRbEueWw7N1TWn hJCOpFYhsD6Gp8ltsYYfkNTTgIFSDLBMj46Egzc07heIr/EDopLY4Zpdv/eU4Rf+ qBryAHuvUU13YyqHiK6UypuZ+RWIUAC+nVaiA45VgYTb0JHy+fk4c= 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=-2.3 required=5.0 tests=AWL,BAYES_00,KAM_SHORT,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=UD:cs.unc.edu, UD:unc.edu X-HELO: limerock03.mail.cornell.edu X-CornellRouted: This message has been Routed already. Subject: Re: umask not working? To: cygwin AT cygwin DOT com References: <000f01d3bf80$a2e0d8c0$e8a28a40$@cl.cam.ac.uk> From: Ken Brown Message-ID: <21cc08fa-d68f-619f-5c11-ff1c903c74d0@cornell.edu> Date: Wed, 21 Mar 2018 09:24:57 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Cornell-Gauge: Gauge=XXXXX X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none; X-IsSubscribed: yes On 3/21/2018 6:36 AM, David Allsopp wrote: > Ken Brown >> On 3/19/2018 8:48 AM, David Allsopp wrote: >>> Is this expected behaviour: >>> >>> OPAM+DRA AT OPAM ~ >>> $ uname -a ; umask ; touch /tmp/foo ; ls -l /tmp/foo ; mkdir /tmp/bar >>> ; touch /tmp/bar/foo ; ls -l /tmp/bar/foo CYGWIN_NT-6.1-WOW OPAM >>> 2.10.0(0.325/5/3) 2018-02-02 15:21 i686 Cygwin >>> 0022 >>> -rw-r--r-- 1 OPAM+DRA OPAM+None 0 Mar 19 13:44 /tmp/foo >>> -rw-rw-r--+ 1 OPAM+DRA OPAM+None 0 Mar 19 13:44 /tmp/bar/foo >>> >>> Why does the file /tmp/bar/foo get g+w when /tmp/foo doesn't - I'm not >>> sure what to look at on my system to diagnose what I may have >>> inadvertently tweaked. The directory itself is: >>> >>> drwxr-xr-x+ 1 OPAM+DRA OPAM+None 0 Mar 19 13:44 /tmp/bar >> >> See if this helps: >> >> https://cygwin.com/faq/faq.html#faq.using.same-with-permissions > > Thanks for the pointer. I wonder from it if this could be to do with the Cygwin installation being old (but upgraded). I tried on the same machine creating another installation to C:\cygwin2 (which behaves as Roger Wells noted) and then ran getfacl /tmp on each: > > Old installation: > > # file: /tmp > # owner: OPAM+DRA-Admin > # group: OPAM+None > user::rwx > user:OPAM+DRA:rwx > group::r-x > mask:rwx > other:r-x > default:user::rwx > default:user:OPAM+DRA:rwx > default:group::r-x > default:mask:rwx > default:other:r-x > > Fresh installation: > > # file: /tmp > # owner: OPAM+DRA-Admin > # group: OPAM+None > # flags: --t > user::rwx > group::rwx > other:rwx > default:user::rwx > default:group::r-x > default:other:r-x > > I expect that the extra OPAM+DRA:rwx on the old installation was manually added by me, years ago. What are the "mask" entries all about? > > The default:mask entry seems to be the crucial one, as if I do setfacl default:mask:rwx /tmp on the fresh installation, then I get the same behaviour as on the old installation. > > However, I'm struggling to find references for either what these mask entries are, or how they ever appeared? If you search the web for "Posix acl mask" you'll find lots of information. Here's one that seems pretty good: https://cs.unc.edu/help-article/posix-acls-in-linux/ Ken -- 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