Date: Tue, 16 Aug 2011 01:32:44 -0700 From: perryh@pluto.rain.com To: kudzu@tenebras.com Cc: yuri@rawbw.com, freebsd-questions@freebsd.org Subject: Re: Group permissions are broken? Message-ID: <4e4a2b2c.yX3blW9IEVGiJ%2BOa%perryh@pluto.rain.com> In-Reply-To: <CAHu1Y73pODE%2BhQSWWQsjWCyjV9iq80sYqMOUKoeCMy8FSj3DFw@mail.gmail.com> References: <4E497C2A.4060403@rawbw.com> <CAHu1Y73pODE%2BhQSWWQsjWCyjV9iq80sYqMOUKoeCMy8FSj3DFw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Michael Sierchio <kudzu@tenebras.com> wrote: > On Mon, Aug 15, 2011 at 1:06 PM, Yuri <yuri@rawbw.com> wrote: > > User john is a member of both webcamd and vboxusers: > > # grep john /etc/group > > webcamd:*:145:john > > vboxusers:*:920:john > > > > When the file /tmp/my-test is owned by webcamd, user john can > > touch it ok: > > $ ls -l /tmp/my-test ; touch ?/tmp/my-test > > -rw-rw---- ?1 vboxusers ?vboxusers ?0 Aug 15 12:54 /tmp/my-test > > > > But when /tmp/my-test is owned by webcamd, user john gets an > > error: > > $ ls -l /tmp/my-test ; touch ?/tmp/my-test > > -rw-rw---- ?1 webcamd ?webcamd ?0 Aug 15 13:02 /tmp/my-test > > touch: /tmp/my-test: Permission denied > > > > Why does this error occur? Two groups seem identical. Just > > different group ids. > > /tmp has the sticky bit set. man 8 sticky On my 8.1 system, sticky(8) says: A directory whose `sticky bit' is set becomes ... a directory in which the _deletion_ of files is restricted. A file in a sticky directory may only be _removed_ or _renamed_ if ... [emphasis added] Nothing there about the sticky bit changing the permissions required to _overwrite_ a file, which is the subject of the current inquiry. Even if the sticky bit _did_ have some effect on overwriting a file, how would that explain the _different_ behavior of the two cases shown?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4e4a2b2c.yX3blW9IEVGiJ%2BOa%perryh>