From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from forward104j.mail.yandex.net (forward104j.mail.yandex.net [5.45.198.247]) by sourceware.org (Postfix) with ESMTPS id 10268385783E for ; Fri, 9 Apr 2021 01:50:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 10268385783E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=yandex.ru Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=anrdaemon@yandex.ru Received: from iva8-def7434e1e2c.qloud-c.yandex.net (iva8-def7434e1e2c.qloud-c.yandex.net [IPv6:2a02:6b8:c0c:3b96:0:640:def7:434e]) by forward104j.mail.yandex.net (Yandex) with ESMTP id 432BB4A10A0; Fri, 9 Apr 2021 04:50:02 +0300 (MSK) Received: from iva6-2d18925256a6.qloud-c.yandex.net (iva6-2d18925256a6.qloud-c.yandex.net [2a02:6b8:c0c:7594:0:640:2d18:9252]) by iva8-def7434e1e2c.qloud-c.yandex.net (mxback/Yandex) with ESMTP id WgSrtZc02a-o2JK5qmr; Fri, 09 Apr 2021 04:50:02 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1617933002; bh=lnzv8FBSAzjwIpatiNLe+3YSFZfpYWMjG7y+2M/Mp7M=; h=In-Reply-To:Subject:To:From:Message-ID:References:Date:Reply-To; b=i2k0wgwmj4gZLpYaenyM0dGU4au0/2NmClDObOhoJtI1+Et7OBR+4hdWihOEVSxvt 6kC/7XAa+ldyV9yYVzflgsexmx7LDA+yaT0BJqAGOexWCmWw/IqzLzA3hBV3kvWywe VGJJeKwFqpOOULnP2lny/OBR9IoUsJbpxl2jFefQ= Authentication-Results: iva8-def7434e1e2c.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru Received: by iva6-2d18925256a6.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id pEbAFbCOZ3-o1KG3coW; Fri, 09 Apr 2021 04:50:01 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Fri, 09 Apr 2021 01:45:12 -0000 Date: Fri, 9 Apr 2021 04:45:12 +0300 From: Andrey Repin X-Mailer: The Bat! (v6.8.8) Home Reply-To: cygwin@cygwin.com X-Priority: 3 (Normal) Message-ID: <1462778363.20210409044512@yandex.ru> To: Orgad Shaneh , cygwin@cygwin.com Subject: Re: A problem with noacl+umask+chmod result In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_THEBAT, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2021 01:50:06 -0000 Greetings, Orgad Shaneh! > On Wed, Apr 7, 2021 at 11:47 PM Orgad Shaneh wrote: >> >> Hi, >> >> If a filesystem is mounted with noacl, calling chmod to add write >> permissions after umasking this permission doesn't work. Demonstrated >> with command-line and C++. >> >> Did I miss something or is this a real bug? According to umask man, it >> should only affect newly created files and directories, but I didn't >> find anything that relates to chmod. >> >> Command-line: >> touch foo >> ls -l foo >> # -rw-r--r-- ... foo >> umask 200 >> chmod 0 foo >> ls -l foo >> # -r--r--r-- ... foo >> chmod 200 foo >> ls -l foo >> # -r--r--r-- ... foo >> # Expected to have rw > Marco Atzeri replied to the mailing list but did not CC me, so I > didn't receive it: The expectation is that you subscribe to the list of interest. >> without ACL you can not expect the POSIX scheme to properly work. >> see >> https://cygwin.com/cygwin-ug-net/ntsec.html >> to understand how Cygwin uses ACL to mimic POSIX permissions > Thanks Marco! > I'm well aware of that. I don't expect it to work properly. From what > I know, it can only set/unset user write bit. Read bits are always > enabled, even on chmod 0. > What I do expect is that the write bit will not be affected by umask. > umask should only affect newly created files, not direct chmod > commands. Yet again: using chmod on noacl filesystem is likely to cause more harm than good. You may very well end up with an unusable filesystem until you fix permissions by hands. -- With best regards, Andrey Repin Friday, April 9, 2021 4:43:01 Sorry for my terrible english...