Your message dated Wed, 03 Jun 2009 21:09:59 -0400
with message-id <[email protected]>
and subject line Re: Bug#531013: coreutils: chmod not resetting setuid/setgid
has caused the Debian Bug report #531013,
regarding coreutils: chmod not resetting setuid/setgid
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
531013: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=531013
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: coreutils
Version: 7.3-1

using chmod (0)0775 isn't clearing setuid/setgid.  I'm sure it used
to, same on lenny and unstable boxes.

$ mkdir foo; ls -l 
drwxr-xr-x 2 root     root     4096 2009-05-29 09:14 foo
$ chmod 2775 foo; ls -l
drwxrwsr-x 2 root     root     4096 2009-05-29 09:14 foo
$ chmod 0775 foo; ls -l
drwxrwsr-x 2 root     root     4096 2009-05-29 09:14 foo
$ chmod 00775 foo; ls -l
drwxrwsr-x 2 root     root     4096 2009-05-29 09:14 foo
$ strace chmod 0775 foo; ls -l
....
fchmodat(AT_FDCWD, "foo", 02775)       = 0
....
drwxrwsr-x 2 root     root     4096 2009-05-29 09:14 foo

Adrian
-- 
Email: [email protected]  -*-  GPG key available on public key servers
Debian GNU/Linux - the maintainable distribution   -*-  www.debian.org



--- End Message ---
--- Begin Message ---
On Fri, May 29, 2009 at 09:25:04AM +0100, Adrian Bridgett wrote:
using chmod (0)0775 isn't clearing setuid/setgid.  I'm sure it used
to,

From NEWS file, version 6.0:

  chmod, install, and mkdir now preserve a directory's set-user-ID and
  set-group-ID bits unless you explicitly request otherwise.  E.g.,
  `chmod 755 DIR' and `chmod u=rwx,go=rx DIR' now preserve DIR's
  set-user-ID and set-group-ID bits instead of clearing them, and
  similarly for `mkdir -m 755 DIR' and `mkdir -m u=rwx,go=rx DIR'.  To
  clear the bits, mention them explicitly in a symbolic mode, e.g.,
  `mkdir -m u=rwx,go=rx,-s DIR'.  To set them, mention them explicitly
  in either a symbolic or a numeric mode, e.g., `mkdir -m 2755 DIR',
  `mkdir -m u=rwx,go=rx,g+s' DIR.  This change is for convenience on
  systems where these bits inherit from parents.  Unfortunately other
  operating systems are not consistent here, and portable scripts
  cannot assume the bits are set, cleared, or preserved, even when the
  bits are explicitly mentioned.  For example, OpenBSD 3.9 `mkdir -m
  777 D' preserves D's setgid bit but `chmod 777 D' clears it.
  Conversely, Solaris 10 `mkdir -m 777 D', `mkdir -m g-s D', and
  `chmod 0777 D' all preserve D's setgid bit, and you must use
  something like `chmod g-s D' to clear it.

Mike Stone


--- End Message ---

Reply via email to