From owner-freebsd-questions@FreeBSD.ORG Fri Jul 25 13:20:35 2008 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D14B1065674 for ; Fri, 25 Jul 2008 13:20:35 +0000 (UTC) (envelope-from wmoran@collaborativefusion.com) Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by mx1.freebsd.org (Postfix) with ESMTP id B65AB8FC1E for ; Fri, 25 Jul 2008 13:20:34 +0000 (UTC) (envelope-from wmoran@collaborativefusion.com) Received: from vanquish.ws.pitbpa0.priv.collaborativefusion.com (vanquish.ws.pitbpa0.priv.collaborativefusion.com [192.168.2.162]) (SSL: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Fri, 25 Jul 2008 09:20:34 -0400 id 00056412.4889D322.0000FEA7 Date: Fri, 25 Jul 2008 09:19:47 -0400 From: Bill Moran To: glarkin@FreeBSD.org Message-Id: <20080725091947.49a3e1b6.wmoran@collaborativefusion.com> In-Reply-To: <4889CB3B.3050308@FreeBSD.org> References: <20080725074526.8f7ae01a.wmoran@collaborativefusion.com> <4889CB3B.3050308@FreeBSD.org> Organization: Collaborative Fusion X-Mailer: Sylpheed 2.4.8 (GTK+ 2.12.9; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: questions@freebsd.org Subject: Re: setuid not working on directories, or am I doing something wrong? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2008 13:20:35 -0000 In response to Greg Larkin : > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Bill Moran wrote: > | $ whoami > | wmoran > | $ mkdir test2 > | $ sudo chown daemon:daemon test2 > | $ sudo chmod 6777 test2 > | $ ls -lah | grep test2 > | drwsrwsrwx 2 daemon daemon 512B Jul 25 07:40 test2 > | $ touch test2/testfile.empty > | $ ls -lah test2 > | total 8 > | drwsrwsrwx 2 daemon daemon 512B Jul 25 07:41 . > | drwxr-xr-x 59 wmoran wheel 6.0K Jul 25 07:40 .. > | -rw-r--r-- 1 wmoran daemon 0B Jul 25 07:41 testfile.empty > | > | Shouldn't testfile.empty show up as daemon:daemon? or am I > | misunderstanding something about how setuid works? > | > | This is on FreeBSD 7, but I observe the same thing on 6.3 and 6.2. > | > > Hi Bill, > > ~From what I've read, you have to take some extra steps to get this to > work. First, visit this page and search for "suiddir": > > http://www.freebsd.org/cgi/man.cgi?query=mount&sektion=8&apropos=0&manpath=FreeBSD+7.0-RELEASE > > I believe you have to run a kernel with the SUIDDIR option enabled, and > then you have to mount your filesystem with the suiddir option, as > described in the mount man page above. > > Let us know if that works for you or not. That explains it, Greg. Thanks for the feedback. -- Bill Moran Collaborative Fusion Inc. http://people.collaborativefusion.com/~wmoran/ wmoran@collaborativefusion.com Phone: 412-422-3463x4023