Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 197924 - sys-apps/coreutils - chmod can't remove setuid and setgid bits from directories in numeric mode
Summary: sys-apps/coreutils - chmod can't remove setuid and setgid bits from directori...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-03 05:37 UTC by ta2002
Modified: 2007-11-03 07:15 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ta2002 2007-11-03 05:37:06 UTC
One of the strangest things I have ever seen (yes, I know I always say that).

# mkdir test 
# chmod 7777 test 
# chmod 0000 test 
# ls -adl test 
d--S--S--- 2 root root 4096 2007-11-02 21:45:55 test/

Absolutely no octal value whatsoever clears the setuid or setgid bits.

Symbolic mode (u-s or g-s) do still work.

I have no idea which update caused this bug (it certainly didn't exist at some point in the past).

What I have now:

$ emerge -p --info
Portage 2.1.3.16 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23-gentoo i686)
=================================================================
System uname: 2.6.23-gentoo i686 Intel(R) Pentium(R) 4 CPU 3.00GHz
Timestamp of tree: Fri, 02 Nov 2007 20:00:01 +0000
app-shells/bash:     3.2_p17
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer -mfpmath=sse"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer -mfpmath=sse"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_NZ.UTF-8"
LINGUAS="en ru"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/layman/sunrise"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acpi alsa arts audiofile berkdb bitmap-fonts bzip2 cairo caps cdparanoia cdr cjk cpudetection cracklib crypt css cups dbus dga directfb dri dvd dvdr dvdread encode exif expat fam fbcon ffmpeg flac gcj ggi gif glibc-omitfp gmp gphoto2 gpm gstreamer hal iconv idea imagemagick imap imlib ipv6 javascript jbig joystick jpeg kde lcms libcaca libwww live lm_sensors mad matroska mbox memlimit midi mmx mmxext mng mp3 mpeg mudflap mysql nas ncurses network nls no-old-linux nodrm nptl nptlonly ogg opengl openmp oscar pcre pdf perl png qt3 quicktime readline real rtc samba scanner sdl silc smtp sndfile speex spell sse sse2 ssl stream svg sysfs tcpd theora threads threadsafe tiff timidity truetype truetype-fonts type1-fonts unicode usb userlocales utf8 vcd vorbis wideband win32codecs x86 xinerama xml xorg xv xvid yahoo zlib zrtp" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LINGUAS="en ru" USERLAND="GNU" VIDEO_CARDS="mga radeon"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 SpanKY gentoo-dev 2007-11-03 07:15:36 UTC
please read the NEWS file

leading 0 is ignored on purpose, you have to use -s to remove the bit