GNU bug report logs - #41554
chmod allows removing x bit on chmod without a force flag, which can be inconvenient to recover from

Previous Next

Package: coreutils;

Reported by: Will Rosecrans <wrosecrans <at> gmail.com>

Date: Wed, 27 May 2020 01:54:02 UTC

Severity: normal

Tags: notabug

Done: Bob Proulx <bob <at> proulx.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Will Rosecrans <wrosecrans <at> gmail.com>
To: 41554 <at> debbugs.gnu.org
Subject: bug#41554: chmod allows removing x bit on chmod without a force flag, which can be inconvenient to recover from
Date: Tue, 26 May 2020 18:30:14 -0700
[Message part 1 (text/plain, inline)]
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"
[Message part 2 (text/html, inline)]

This bug report was last modified 5 years and 52 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.