strange pw behaviour
    Jonas Sonntag 
    jonas.sonntag at jbhosting.de
       
    Fri Jun 25 09:18:04 PDT 2004
    
    
  
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
    
    
More information about the freebsd-questions
mailing list