<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: SGID Bug</title>
	<atom:link href="http://pthree.org/2008/01/30/sgid-bug/feed/" rel="self" type="application/rss+xml" />
	<link>http://pthree.org/2008/01/30/sgid-bug/</link>
	<description>Linux.  GNU.  Freedom.</description>
	<pubDate>Thu, 04 Dec 2008 00:44:07 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7-RC1-10015</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Josh</title>
		<link>http://pthree.org/2008/01/30/sgid-bug/#comment-106541</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Mon, 18 Aug 2008 14:40:43 +0000</pubDate>
		<guid isPermaLink="false">http://pthree.org/2008/01/30/sgid-bug/#comment-106541</guid>
		<description>Sorry to bump an old-ish thread, but I ran into this exact same issue. I created a directory, created a new group with the users I wanted to be able to access the directory, set the permissions to 770 on the directory, then tried to chmod g+s the directory and got no error. I'm actually part of the group in question, but it still wouldn't let me do it.

I think the bottom line on the "bug vs not bug" conversation is this:
You ran the command to set the sgid permission to g+s. Expected behavior is that when you ls -a, you see s (or S if you don't have +x) in the "group execute" / "sgid" column of the file permissions. That, or you get an "operation not permitted" error just like if you try to change a permission to something you don't own.

Just because a bug is documented doesn't mean it's not still a bug. Case in point: The Microsoft Knowledge Base.</description>
		<content:encoded><![CDATA[<p>Sorry to bump an old-ish thread, but I ran into this exact same issue. I created a directory, created a new group with the users I wanted to be able to access the directory, set the permissions to 770 on the directory, then tried to chmod g+s the directory and got no error. I&#8217;m actually part of the group in question, but it still wouldn&#8217;t let me do it.</p>
<p>I think the bottom line on the &#8220;bug vs not bug&#8221; conversation is this:<br />
You ran the command to set the sgid permission to g+s. Expected behavior is that when you ls -a, you see s (or S if you don&#8217;t have +x) in the &#8220;group execute&#8221; / &#8220;sgid&#8221; column of the file permissions. That, or you get an &#8220;operation not permitted&#8221; error just like if you try to change a permission to something you don&#8217;t own.</p>
<p>Just because a bug is documented doesn&#8217;t mean it&#8217;s not still a bug. Case in point: The Microsoft Knowledge Base.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron</title>
		<link>http://pthree.org/2008/01/30/sgid-bug/#comment-90288</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Thu, 31 Jan 2008 14:00:42 +0000</pubDate>
		<guid isPermaLink="false">http://pthree.org/2008/01/30/sgid-bug/#comment-90288</guid>
		<description>@ThaddeusQ-  Regardless of how remote the documentation is, if it exists, it's not a bug any longer?  Don't you find that a little absurd?  Also, couldn't it be argued that this is unexpected behavior?  Certainly, the user who discovers this will be wondering what's going on, and call me crazy, but I doubt they'll pull up the dev man pages to figure it out.</description>
		<content:encoded><![CDATA[<p>@ThaddeusQ-  Regardless of how remote the documentation is, if it exists, it&#8217;s not a bug any longer?  Don&#8217;t you find that a little absurd?  Also, couldn&#8217;t it be argued that this is unexpected behavior?  Certainly, the user who discovers this will be wondering what&#8217;s going on, and call me crazy, but I doubt they&#8217;ll pull up the dev man pages to figure it out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: .</title>
		<link>http://pthree.org/2008/01/30/sgid-bug/#comment-90223</link>
		<dc:creator>.</dc:creator>
		<pubDate>Wed, 30 Jan 2008 19:02:53 +0000</pubDate>
		<guid isPermaLink="false">http://pthree.org/2008/01/30/sgid-bug/#comment-90223</guid>
		<description>A document bug is not a bug anymore, it's a feature =).</description>
		<content:encoded><![CDATA[<p>A document bug is not a bug anymore, it&#8217;s a feature =).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ThaddeusQ</title>
		<link>http://pthree.org/2008/01/30/sgid-bug/#comment-90218</link>
		<dc:creator>ThaddeusQ</dc:creator>
		<pubDate>Wed, 30 Jan 2008 18:05:50 +0000</pubDate>
		<guid isPermaLink="false">http://pthree.org/2008/01/30/sgid-bug/#comment-90218</guid>
		<description>A bug is when something happens that is not expected behavior. This is expected behavior as evidenced by the documentation. Just because it doesn't match your expectations doesn't make it a bug. Just my 2 cents worth.</description>
		<content:encoded><![CDATA[<p>A bug is when something happens that is not expected behavior. This is expected behavior as evidenced by the documentation. Just because it doesn&#8217;t match your expectations doesn&#8217;t make it a bug. Just my 2 cents worth.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron</title>
		<link>http://pthree.org/2008/01/30/sgid-bug/#comment-90212</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Wed, 30 Jan 2008 16:15:55 +0000</pubDate>
		<guid isPermaLink="false">http://pthree.org/2008/01/30/sgid-bug/#comment-90212</guid>
		<description>Hmm.  Still a bug, though.  If the user is not notified to the behavior of a process and it is not logged, then in my book, that definitely qualifies as a bug.  How else would the user know what is happening when the bit is not set?</description>
		<content:encoded><![CDATA[<p>Hmm.  Still a bug, though.  If the user is not notified to the behavior of a process and it is not logged, then in my book, that definitely qualifies as a bug.  How else would the user know what is happening when the bit is not set?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Byron Clark</title>
		<link>http://pthree.org/2008/01/30/sgid-bug/#comment-90210</link>
		<dc:creator>Byron Clark</dc:creator>
		<pubDate>Wed, 30 Jan 2008 16:05:04 +0000</pubDate>
		<guid isPermaLink="false">http://pthree.org/2008/01/30/sgid-bug/#comment-90210</guid>
		<description>Turns out this behavior is documented, just not where you may think.  From chmod(2):

       If the calling process is not privileged  (Linux:  does  not  have  the
       CAP_FSETID  capability),  and  the group of the file does not match the
       effective group ID of the process or one  of  its  supplementary  group
       IDs,  the  S_ISGID  bit  will be turned off, but this will not cause an
       error to be returned.</description>
		<content:encoded><![CDATA[<p>Turns out this behavior is documented, just not where you may think.  From chmod(2):</p>
<p>       If the calling process is not privileged  (Linux:  does  not  have  the<br />
       CAP_FSETID  capability),  and  the group of the file does not match the<br />
       effective group ID of the process or one  of  its  supplementary  group<br />
       IDs,  the  S_ISGID  bit  will be turned off, but this will not cause an<br />
       error to be returned.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Byron Clark</title>
		<link>http://pthree.org/2008/01/30/sgid-bug/#comment-90209</link>
		<dc:creator>Byron Clark</dc:creator>
		<pubDate>Wed, 30 Jan 2008 15:45:52 +0000</pubDate>
		<guid isPermaLink="false">http://pthree.org/2008/01/30/sgid-bug/#comment-90209</guid>
		<description>The chmod command isn't reporting an error because the chmod syscall isn't reporting an error.  You can verify this by running the chmod command under strace and grepping for the chmod syscall.</description>
		<content:encoded><![CDATA[<p>The chmod command isn&#8217;t reporting an error because the chmod syscall isn&#8217;t reporting an error.  You can verify this by running the chmod command under strace and grepping for the chmod syscall.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
