From owner-freebsd-questions@FreeBSD.ORG Fri Jun 25 16:18:04 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5826416A4CE for ; Fri, 25 Jun 2004 16:18:04 +0000 (GMT) Received: from mailgate.jbhosting.de (mailgate1.jbhosting.de [80.190.201.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E09743D31 for ; Fri, 25 Jun 2004 16:18:03 +0000 (GMT) (envelope-from jonas.sonntag@jbhosting.de) Received: from jbhosting.de (007.ports.jbhosting.de [80.190.201.7] (may be forged))i5PD8uxU028093 for ; Fri, 25 Jun 2004 15:08:56 +0200 (CEST) (envelope-from jonas.sonntag@jbhosting.de) Received: (qmail 28091 invoked by uid 545); 25 Jun 2004 13:08:55 -0000 Received: from unknown (HELO ?192.168.0.42?) (jonsonn@jbhosting.de@213.155.74.126) by mx010.jbhosting.de with SMTP; 25 Jun 2004 13:08:55 -0000 From: Jonas Sonntag Organization: JB Hosting To: freebsd-questions@freebsd.org Date: Fri, 25 Jun 2004 15:00:20 +0200 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200406251500.20839.jonas.sonntag@jbhosting.de> X-Spam-Score: 0 (not scanned because domain is not listed for scanning) X-Scanned-By: MIMEDefang 2.42 Subject: strange pw behaviour X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jun 2004 16:18:04 -0000 Hi questions-list, I'm experiencing some strange behaviour when using pw on a 4.9-STABLE system to add and modify a group within a virtual server running inside a jail as described in the jail man-page. I'm running these commands from a script: pw groupadd newgroup -g 1010 -V /path/to/jail/etc/ pw groupmod newgroup -m www -V /path/to/jail/etc/ chroot /path/to/jail/ apachectl graceful Just like I'm expecting, I get a new entry in /etc/group within the jail looking like this: newgroup:*:1010:www and httpd gracefully restarted from apachectl. Now I would expect that apache should be able to access directories owned by group newgroup with chmod 750 set. This is not the case. Investigating further, I used vipw to give a shell to user www and used su to become www. When I try to enter the directory in question I get Permission denied. Now for the funny part: Back as user root I'm using vi to edit /etc/group by hand and simply move the new entry to another line within the group file, have apache do another graceful restart and everything works fine! su'ing to user www and cd'ing to the directory in question also works as expected. What am I getting wrong here? Why do I need to modify the /etc/group file by hand before this works? Any hints would be appreciated. Thanks and best regards, Jonas