Debian Bug report logs - #27248
fileutils: chown resets suid and sgid bits, but it is undocumented

version graph

Package: fileutils; Maintainer for fileutils is (unknown);

Reported by: Teddy Hogeborn <teddy@recompile.se>

Date: Wed, 30 Sep 1998 09:33:01 UTC

Severity: fixed

Found in version 3.16-5.3

Done: Michael Stone <mstone@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Galen Hazelwood <galenh@micron.net>:
Bug#27248; Package fileutils. (full text, mbox, link).


Acknowledgement sent to Teddy Hogeborn <teddy@fukt.hk-r.se>:
New bug report received and forwarded. Copy sent to Galen Hazelwood <galenh@micron.net>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Teddy Hogeborn <teddy@fukt.hk-r.se>
To: submit@bugs.debian.org
Subject: fileutils: chown resets suid and sgid bits, but it is undocumented
Date: Wed, 30 Sep 1998 11:26:24 +0200
Package: fileutils
Version: 3.16-5.3

Documentation bug:

The glibc chown(2) call resets suid and sgid bits, and the behaviour
is documented.  The documentation for the chown(1) command (which
calls chown(2)) does *not* mention this quirk, however.

Wishlist item:

Since the resetting of suid and sgid bits is not traditional (is was
not in 4.3BSD), maybe there should be a option switch to turn it off?

Or maybe it should not even be the default for directories?

Rant:

I can sort of understand the reason for this behaviour when applied to
executable files (the chown(2) manpage implies that POSIX specifies
it), but what is the rationale for it when applied to suid and/or sgid
directories?  Does POSIX specify that as well?  What about the sgid
bit when just changing the user, and vice versa?

(Should I submit this behaviour on directories as a libc bug?)

It seems really meaningless (and it's especially annoying) to have the
sgid bit disappear on a sgid directory with a special group when you
just do a "chown" and don't even specify a different group.

Even more so considering that older unices didn't do that, and it
therefore breaks older programs (like SmartList) which assume they can
do chmod g+s on a directory and then chown it to some user.

/Teddy

-- System Information
Debian Release: 2.0
Kernel Version: Linux nigol 2.0.34 #1 Tue Aug 18 03:24:20 MEST 1998 i486 unknown

Versions of the packages fileutils depends on:
ii  libc6           2.0.7t-1       The GNU C library version 2 (run-time files)


Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#27248; Package fileutils. (full text, mbox, link).


Acknowledgement sent to Michael Stone <mstone@debian.org>:
Extra info received and forwarded to list. (full text, mbox, link).


Message #10 received at 27248@bugs.debian.org (full text, mbox, reply):

From: Michael Stone <mstone@debian.org>
To: 27248@bugs.debian.org
Subject: re: fileutils: chown resets suid and sgid bits, but it is undocumented
Date: Thu, 28 Oct 1999 18:49:23 -0400
This is actually a linux kernel function, not a fileutils or glibc
issue. The chown(1) documentation isn't specific to linux, so it
wouldn't mention our implementation details. I'm probably going to close
this bug unless someone comes up with a reason not to, as I'm leery of
maintaining documentation that differs from upstream's.

Mike Stone


Severity set to `fixed'. Request was from Michael Stone <mstone@debian.org> to control@bugs.debian.org. (full text, mbox, link).


Bug closed, send any further explanations to Teddy Hogeborn <teddy@fukt.hk-r.se> Request was from Michael Stone <mstone@debian.org> to control@bugs.debian.org. (full text, mbox, link).


Bug unarchived. Request was from Teddy Hogeborn <teddy@fukt.bsnet.se> to control@bugs.debian.org. (Sat, 29 Nov 2008 21:34:31 GMT) (full text, mbox, link).


Changed Bug submitter from Teddy Hogeborn <teddy@fukt.hk-r.se> to Teddy Hogeborn <teddy@fukt.bsnet.se>. Request was from Teddy Hogeborn <teddy@fukt.bsnet.se> to control@bugs.debian.org. (Sat, 29 Nov 2008 21:34:33 GMT) (full text, mbox, link).


Bug archived. Request was from Teddy Hogeborn <teddy@fukt.bsnet.se> to control@bugs.debian.org. (Sat, 29 Nov 2008 21:34:34 GMT) (full text, mbox, link).


Bug unarchived. Request was from Teddy Hogeborn <teddy@recompile.se> to control@bugs.debian.org. (Mon, 10 Oct 2011 08:03:20 GMT) (full text, mbox, link).


Changed Bug submitter to 'Teddy Hogeborn <teddy@recompile.se>' from 'Teddy Hogeborn <teddy@fukt.bsnet.se>' Request was from Teddy Hogeborn <teddy@recompile.se> to control@bugs.debian.org. (Mon, 10 Oct 2011 08:03:21 GMT) (full text, mbox, link).


Bug archived. Request was from Teddy Hogeborn <teddy@recompile.se> to control@bugs.debian.org. (Mon, 10 Oct 2011 08:03:21 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Jul 1 13:13:40 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.