Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 6AC07780ECB for <~alpine/users@lists.alpinelinux.org>; Sat, 26 Sep 2020 18:45:01 +0000 (UTC) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id E19E05A6 for <~alpine/users@lists.alpinelinux.org>; Sat, 26 Sep 2020 14:44:59 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sat, 26 Sep 2020 14:45:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ml1.net; h=date :from:to:subject:message-id:mime-version:content-type; s=fm1; bh=u4B9j0SYUK1PvBStPypSh/AtWPnpgA9TONbqf+C1mhw=; b=kGxIc5nV+Dvi QunfS4IPzN1uIxU0QOouhECWAwctntgZRLvhLuT1mwxYYz0eyetztWn4bNdMkFnx ZjRoRc8AAvAi2s8JA77eRa+zcpq+xAoDCloPQWfl62brRvSqFvq/VqGFtjUCQMgD W8ri1aU2TUUPzuuiFKhOuoimKXXSwRSvXLb19NgtNiJclEshyFAzoxRvfb+3TyX9 zl90aBPwj2LSl7WrGhUg8r1ssTy/4WFe/zYk+/LSNaS8kECfnqsf4vHhimy5q/OJ xRFrLmzkfe3sg6op07tU56CZHu8GcXrpm9abV7/jagLUmiZn+ZciO6D7CZrpWzCi aJRyR5KbFg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=u4B9j0SYUK1PvBStPypSh/AtWPnpg A9TONbqf+C1mhw=; b=TTydBsyI1GcqKx9J5Aqf7B+W3xHhvaPmIdzMN4M/J/YNU aTPWRh3kZVsBAh8bgbdOomXQby8vGSU4HGe2c1k8QCgYSvJXpZ9gsLFrrLMJEmej zjkoIXkYYEZmNqPwOBZG3iOQl8vX4/jrW/psI4bDhvdzPLrYSVPURq0dCnVzkKir zLQyHRtSebD7orljUwnQcCiq4nZ4XpudVJVFBW6XD3TuE8nBqJILNfRtkyoyQQND dPDdEju6P+bkom+HIEXLiblrNwQoQ5gO2d0sKgypQNdM7deyaWeiGhKIOl55VS8c EQj4SD2CFXMqnBnlJHHQfaAnmvNpSTT2zyhFZsMUw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddvgddufedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkgggtugesthdtredttd dtvdenucfhrhhomhephghinhhsthhonhcuhggvihhnvghrthcuoeifihhnshhtohhnsehm lhdurdhnvghtqeenucggtffrrghtthgvrhhnpeeliedtvedvtdfhvddvveehhfdvvddvle effffgudejgeekieehhfejhfeiueduheenucffohhmrghinhepvhhmrdgsohigpdifihhn nhihrdhtvggthhenucfkphepjeehrdejvddrudehhedrvddunecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepfihinhhsthhonhesmhhluddrnhgv th X-ME-Proxy: Received: from ml1.net (c-75-72-155-21.hsd1.wi.comcast.net [75.72.155.21]) by mail.messagingengine.com (Postfix) with ESMTPA id 12C4C328005E for <~alpine/users@lists.alpinelinux.org>; Sat, 26 Sep 2020 14:44:58 -0400 (EDT) Date: Sat, 26 Sep 2020 13:44:57 -0500 From: Winston Weinert To: ~alpine/users@lists.alpinelinux.org Subject: umask 0022 creating directories with setgid? Message-ID: <20200926184457.le4pu5gp6ukgi45c@ml1.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On some of my alpine boxes setting the umask to 0077 and subsequently running mkdir creates a directory with permissions 2700. Has anybody noticed this strange behavior? It appears fixed in the repository, but I'd like to understand the cause of the issue. In short I see the following output when running this script: umask 0077 mkdir thing ls -ld thing outputs: drwx--S--- 2 vagrant vagrant 4096 Sep 26 18:01 thing All the machines run 3.12.0, though the affected ones were last updated several months ago. In case anybody wants to reproduce the issue I found this will do it. This example uses a vagrant box from about two months ago: 1. Create a Vagrantfile with the following contents Vagrant.configure("2") do |config| config.vm.box = "generic/alpine312" config.vm.box_version = '3.0.14' end 2. run vagrant up && vagrant ssh 3. in the ssh session run the reproducer umask 0077 mkdir thing ls -ld thing Thanks in advance. Winston Weinert https://winny.tech/