From debbugs-submit-bounces@debbugs.gnu.org Tue May 26 21:53:37 2020 Received: (at submit) by debbugs.gnu.org; 27 May 2020 01:53:37 +0000 Received: from localhost ([127.0.0.1]:47561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdlGC-0003nc-Ts for submit@debbugs.gnu.org; Tue, 26 May 2020 21:53:37 -0400 Received: from lists.gnu.org ([209.51.188.17]:34492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdktr-0003Ey-Dr for submit@debbugs.gnu.org; Tue, 26 May 2020 21:30:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdktq-0007jJ-7q for bug-coreutils@gnu.org; Tue, 26 May 2020 21:30:30 -0400 Received: from mail-oi1-x233.google.com ([2607:f8b0:4864:20::233]:46313) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdktp-0004mf-FW for bug-coreutils@gnu.org; Tue, 26 May 2020 21:30:29 -0400 Received: by mail-oi1-x233.google.com with SMTP id b3so20361593oib.13 for ; Tue, 26 May 2020 18:30:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=1ksLYkXJqyrTmp5XcyLPjo91584zSSwPBCCWCBvzCCk=; b=TKFL80X65+7RPIo/YyExjRU7M4Uk71+VKLd9p7a89wkLj9HWnBh5aQfZ54M3YjPuR7 0B8ku7gOnZDNG5YS47VAavgGIU+tc/IUL1LQLFjMl9ZwKL5CJvcgdePnmrJ/XHpezCIM eE2qQxOeHf8l5+fTghuG1tQAyCXWGNzl9SWFUdWerS18PdEgHElED4v6Nw4x0UbDYE5A bbjKMbqSnphc3Vvx3Zo5X5HPrJmfxmEt1ZmfJMWzS5V2XIXC73FiNhgiXHKy84odmF3g w1nJdun2uB6lIVSH3BaLTLaO3/6zWOz4BJRWGomBwN2j0C2pDUROk82WxPv9OGprCqPk 1Wzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=1ksLYkXJqyrTmp5XcyLPjo91584zSSwPBCCWCBvzCCk=; b=nJaD3+QuzGbt0Y8eK+BXiGMrPfVQ6VIIWTx6FqrUYFfjsd8UuWHnGyp7mgdo+PaRfl 08Qzc2lY2LKyQC308forLOt7Quj9Ltpl4P3KvOcm44Rqpdjo9YnFC5Ua95D/Egb3ObDz FxF8rky1QyRyeA/c73N4VAp0yf4VxkmT3n9WX9+3qQjrOzjKEgpqBffNOxu9PZIOhhlw TwJ1s29Jms4AzZN69C9KGkud6laEsKmunUqaKG1ZRgp7T8riPWrtgclarSunRiYsV8lt MgZMcr3OgD6fk2R0YxJp21wbJGEZWzi4r7Wq3rQTwL2U4zuTgeeDCOBV3VnvpTmtLoy4 ImvA== X-Gm-Message-State: AOAM530Xjxg7kZkJuFeq50PKcNqonXXxqChvQvXf15Hf7XKUPO8qWuA5 m7Tr7g6/HTslnNK/bl0EB+jaX0OivRbvM3GHo+LJkOhad6M= X-Google-Smtp-Source: ABdhPJwN9dCv50+DkVnLcCXFbIyhy4YFzgm9UMn4P90sR+fDJvBQpqNV6fnH5uX7dbVprVPVQH78XSfEI2/QEJOJ1ao= X-Received: by 2002:aca:5296:: with SMTP id g144mr1132876oib.33.1590543027377; Tue, 26 May 2020 18:30:27 -0700 (PDT) MIME-Version: 1.0 From: Will Rosecrans Date: Tue, 26 May 2020 18:30:14 -0700 Message-ID: Subject: chmod allows removing x bit on chmod without a force flag, which can be inconvenient to recover from To: bug-coreutils@gnu.org Content-Type: multipart/alternative; boundary="000000000000259ac305a69728b0" Received-SPF: pass client-ip=2607:f8b0:4864:20::233; envelope-from=wrosecrans@gmail.com; helo=mail-oi1-x233.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 26 May 2020 21:53:35 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --000000000000259ac305a69728b0 Content-Type: text/plain; charset="UTF-8" Based on an inane interview question that was discussed here on Twitter: https://twitter.com/QuinnyPig/status/1265286980859908102 "chmod a-x $(which chmod)" not a particularly likely thing for a user to try to do directly, but it is conceivable for some sort of script to attempt it by accident because of a bug, and it would make the system inconvenient to recover. Since it's almost never a desirable operation, chmodding chmod itself could simply fail unless something like --force is supplied. The underlying safety logic is similar to that behind the existing "--(no-)preserve-root" --000000000000259ac305a69728b0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Based on an inane interview question that was discussed he= re on Twitter:=C2=A0=C2=A0https://twitter.com/QuinnyPig/status/126528698085990810= 2

"chmod a-x $(which chmod)" not a particu= larly likely thing for a user to try to do directly, but it is conceivable= =C2=A0for some sort of script to attempt it by accident because of a bug, a= nd it would make the system inconvenient to recover.=C2=A0 Since it's a= lmost never a desirable operation, chmodding chmod itself could simply fail= unless something like --force is supplied.=C2=A0 The underlying safety log= ic is similar to that behind the existing "--(no-)preserve-root"<= /div>
--000000000000259ac305a69728b0-- From debbugs-submit-bounces@debbugs.gnu.org Tue May 26 22:54:18 2020 Received: (at 41554) by debbugs.gnu.org; 27 May 2020 02:54:18 +0000 Received: from localhost ([127.0.0.1]:47590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdmCv-0005IS-WC for submit@debbugs.gnu.org; Tue, 26 May 2020 22:54:18 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:35634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdmCt-0005IF-RX for 41554@debbugs.gnu.org; Tue, 26 May 2020 22:54:16 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 7436C1600E0; Tue, 26 May 2020 19:54:09 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 6J0Iovv2twGl; Tue, 26 May 2020 19:54:08 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4FD241600E1; Tue, 26 May 2020 19:54:08 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id DQ7l5KbMMnyH; Tue, 26 May 2020 19:54:08 -0700 (PDT) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 2D50D1600E0; Tue, 26 May 2020 19:54:08 -0700 (PDT) Subject: Re: bug#41554: chmod allows removing x bit on chmod without a force flag, which can be inconvenient to recover from To: Will Rosecrans , 41554@debbugs.gnu.org References: From: Paul Eggert Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; ke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:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41554 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 5/26/20 6:30 PM, Will Rosecrans wrote: > The underlying safety logic is similar to that behind the > existing "--(no-)preserve-root" I think not. There are all sorts of other things one shouldn't chmod either, but we can't and shouldn't maintain a long list. Let's stop with "/". From debbugs-submit-bounces@debbugs.gnu.org Wed May 27 04:13:17 2020 Received: (at 41554) by debbugs.gnu.org; 27 May 2020 08:13:17 +0000 Received: from localhost ([127.0.0.1]:48186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdrBc-0004um-Vc for submit@debbugs.gnu.org; Wed, 27 May 2020 04:13:17 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:36873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jdrBa-0004ua-Uw for 41554@debbugs.gnu.org; Wed, 27 May 2020 04:13:15 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 49X3Vd525Dz1qs3c; Wed, 27 May 2020 10:13:13 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49X3Vd3W45z1shfd; Wed, 27 May 2020 10:13:13 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id RwWlXYM4_Q4f; Wed, 27 May 2020 10:13:12 +0200 (CEST) X-Auth-Info: 4gyt1jX7nfj1JIFC2QUZ0q5/69R0dbWk+bCPu7Qh8qo+vWLBRjsaTqdMmb+PI3jC Received: from igel.home (ppp-46-244-163-29.dynamic.mnet-online.de [46.244.163.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 27 May 2020 10:13:12 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id 1E3752C0D21; Wed, 27 May 2020 10:13:12 +0200 (CEST) From: Andreas Schwab To: Will Rosecrans Subject: Re: bug#41554: chmod allows removing x bit on chmod without a force flag, which can be inconvenient to recover from References: X-Yow: I haven't been married in over six years, but we had sexual counseling every day from Oral Roberts!! Date: Wed, 27 May 2020 10:13:12 +0200 In-Reply-To: (Will Rosecrans's message of "Tue, 26 May 2020 18:30:14 -0700") Message-ID: <875zchyew7.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 41554 Cc: 41554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) On Mai 26 2020, Will Rosecrans wrote: > "chmod a-x $(which chmod)" not a particularly likely thing for a user to > try to do directly, but it is conceivable for some sort of script to > attempt it by accident because of a bug, and it would make the system > inconvenient to recover. It will likely fail with EPERM. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Fri May 29 19:01:59 2020 Received: (at 41554) by debbugs.gnu.org; 29 May 2020 23:01:59 +0000 Received: from localhost ([127.0.0.1]:56476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeo0k-0001bq-VS for submit@debbugs.gnu.org; Fri, 29 May 2020 19:01:59 -0400 Received: from havoc.proulx.com ([96.88.95.61]:43092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeo0i-0001ba-FR; Fri, 29 May 2020 19:01:57 -0400 Received: from joseki.proulx.com (localhost [127.0.0.1]) by havoc.proulx.com (Postfix) with ESMTP id 83A5A477; Fri, 29 May 2020 17:01:50 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proulx.com; s=dkim2048; t=1590793310; bh=GXbVDU112qeuUT+TbZoWQZ2XUL6U6VoTWOY+c9cnIUU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pirLu0TkwgfQO746OzN75M2sggHzYkzcJRBkQ3Ikyp5OPsjXtBgln5pWFmqj/ER5l Wd+LDgwqhWnG3xuZAvcw163a/TX5mnHUxvtxCi6Jp3/3TOKfjvl073nZM13abWFhie P3BOKlJYRFhxS2eSxbCafy46aP0RzH2CfsDUWC+NfECMXqlMKiQvxga+p5QAW92nN+ p5E8KRaqQyD3QYuaUgHxvEpbc17osTShvI/vltJIdVtlO90m3/F99K8AzfwP6zCxfQ QxyH6LIazAVhU9nvVwfenoPD503zNy2mGzMWTTSfyygEy1s7mkQ0BfHvJhvWx2t5Ng EsqArqiDvPKog== Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 51AB821144; Fri, 29 May 2020 17:01:50 -0600 (MDT) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 3B43B2DC8E; Fri, 29 May 2020 17:01:50 -0600 (MDT) Date: Fri, 29 May 2020 17:01:50 -0600 From: Bob Proulx To: Will Rosecrans Subject: Re: bug#41554: chmod allows removing x bit on chmod without a force flag, which can be inconvenient to recover from Message-ID: <20200529163606099752819@bob.proulx.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41554 Cc: 41554@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tag 41554 + notabug close 41554 thanks Will Rosecrans wrote: > Based on an inane interview question that was discussed here on Twitter: > https://twitter.com/QuinnyPig/status/1265286980859908102 It's an interview question. The purpose of this type of question is never a practical existing problem but is instead to create a unique, unusual, and unlikely to have been previously experienced problem for discussion with the candidate. To see how the candidate thinks about problems like this. To see if they give up immediately or if they persevere on. To see if they try to use available resources such as discussing the problem with the interviewer. It's a method to see the candidate's problem solving skills in action. If the candidate says, here is the canonical correct solution, then the interviewer knows that the candidate has seen this question before, the interviewer will have learned nothing about the candidates problem solving skills, and will simply move on to another question continuing to try to assess this. I am not particularly fond of interviewers that fish for a particular answer. Better when the interviewer knows they are looking for an open ended discussion. The goal is assessing the candidate's problem solving ability not rote memorization of test prep questions and answers. It is easy to say, oh, we will simply have the program avoid changing itself, since it that would almost never desirable. But that says that it is sometimes desirable. And though easy to say it is actually very hard to program it to avoid creating new bugs. I might say impossible. If this particular case were to be modified in the program the only results would be that the interviewer would need to look for a different inane, unique, unusual, and unlikely to have been experienced situation to put the candidate in. But along the way the program would have acquired a bit of cruft. It would be an unnatural growth on the program source. It would forever need testing. It adds complexity. It would likely be the source of an actual real world bug. As opposed to this thought-experiment situation. > "chmod a-x $(which chmod)" not a particularly likely thing for a user to > try to do directly, but it is conceivable for some sort of script to > attempt it by accident because of a bug, and it would make the system > inconvenient to recover. Since it's almost never a desirable operation, > chmodding chmod itself could simply fail unless something like --force is > supplied. The underlying safety logic is similar to that behind the > existing "--(no-)preserve-root" There are an infinite number of ways for someone to program a mistake. Trying to enumerate them all in a program to prevent them is one of them. Bob From unknown Mon Aug 18 08:57:07 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 27 Jun 2020 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator