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:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=mi1xhvBhtkTQVhZn iCcM0o5IS3p/HEjH7ZQE7DqwH7O52ryphGDyGDiQslw59NYJTTgFSAeV5drGqUgn zYsDITxr4NGFHEdjcIzApVJzBheHrs+Agh+PqX4LgsmcqRtAPJCoM4TiZTvT4tqj dePCuLgriuAJgvBWvK/PFVZFVIg= 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:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=default; bh=cB0FrDfH8U1RnkRN5dExl+ XAlWM=; b=FCFdz8urgmvKilovzo9WZiw7weiBpieXBIudSgMCIj/TLhFu0zKima nVYjFhee3ptnRfV3M7/ciqY8vjNnATsPTGjvLwbWTntTASpjjZj4kQ+qikNIp43h VXPM6ZBVFaUr3/XhfSSRIcekpC9XFyC6q+7c8GfQFQva8oId6PFzk= 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=1.0 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_THEBAT,MIME_BASE64_BLANKS,MIME_BASE64_TEXT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=H*M:yandex, H*RU:192.168.1.10, H*r:ip*192.168.1.10, Hx-spam-relays-external:192.168.1.10 X-HELO: forward102p.mail.yandex.net Authentication-Results: smtp2j.mail.yandex.net; dkim=pass header.i=@yandex.ru Date: Wed, 21 Mar 2018 15:33:38 +0300 From: Andrey Repin Reply-To: cygwin AT cygwin DOT com Message-ID: <1787166367.20180321153338@yandex.ru> To: David Allsopp , cygwin AT cygwin DOT com Subject: Re: umask not working? In-Reply-To: References: <000f01d3bf80$a2e0d8c0$e8a28a40$@cl.cam.ac.uk> <1941712084 DOT 20180319200734 AT yandex DOT ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id w2LCaoA4004081 Greetings, David Allsopp! > Andrey Repin wrote: >> Greetings, David Allsopp! >> >> > 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 >> >> Let me guess, /tmp usertemp ? > No - it's default mounts, so /tmp = C:\cygwin\tmp, to which my > (non-administrative) user has write access. >> You have extended ACL on the object. And overall, umask is not a good >> idea in Windows. > "umask is not a good idea in Windows" - where's that come from? From knowledge and experience. umask is strictly simple POSIX modes concept. In the ACL environment it is anything from inappropriate to disastrous, but never useful. > (In the actual scenario where I'm being bitten by this, it's because a git > checkout is altering files which were 644 to be 664, so whether it's > precisely umask or not, the *change* of permissions is the problem). Use setfacl. -- With best regards, Andrey Repin Wednesday, March 21, 2018 15:32:21 Sorry for my terrible english... -- 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