LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > conf/vhconf.xml is not a valid file AFTER upgrade

Reply
 
Thread Tools Display Modes
  #1  
Old 06-13-2012, 10:39 AM
ikiji ikiji is offline
New Member
 
Join Date: Oct 2011
Posts: 7
Default conf/vhconf.xml is not a valid file AFTER upgrade

Hi,

Ok, so we have a few sites on a CentOS VPS.

Each site is inside:

/home/<user1>
/home/<user2>
etc

Permissions of /home/ are set as:
USER GROUP DIRECTORY
drwx--x--- 6 user1 user1 4096 Oct 23 2011 user1
drwx--x--- 6 user2 user2 4096 Oct 23 2011 user2


We issue the commands:
usermod -a -G user1 lsadm
usermod -a -G user1 nobody


Then when we go into Configuration -> Virtual Hosts and the site for user1 we can update the settings and the vhconf.xml is written to fine.

Every so often, when coming back to the LiteSpeed admin to look at the config for a site, we get the dreaded red writing error message saying the vhconf.xml is not present/accessible.

Issuing the first usermod command as above and a graceful restart fixes it

I've noticed this happening AFTER each upgrade and need to monitor and see if that was coincidence or not.

Can anyone think why 'user1' would be disappearing from the group 'lsadm'?
Is the upgrade for some reason resetting the group?

Any help/suggestions for securing the sites better would be much appreciated.
Reply With Quote
  #2  
Old 06-13-2012, 06:54 PM
NiteWave NiteWave is online now
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
what's the permission of conf/, conf/vhconf.xml ?
Reply With Quote
  #3  
Old 06-13-2012, 11:26 PM
ikiji ikiji is offline
New Member
 
Join Date: Oct 2011
Posts: 7
Hi

/home/user1:

drwxrwxr-x 2 user1 user1 4096 Nov 27 2011 conf
-rw-r--r-- 1 lsadm lsadm 831 Nov 27 2011 vhconf.xml

As mentioned, it works fine after adding user1 to the lsadm group

BUT

Why would an upgrade touch group assigments?
I'm finding that it stops working and that by re-issuing the usermod command it starts working again.

Many thanks
Reply With Quote
  #4  
Old 06-14-2012, 12:38 AM
NiteWave NiteWave is online now
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
I can reproduce the issue you reported on centOS:
#groups lsadm
lsadm : lsadm nobody user1

after upgrade:
#groups lsadm
lsadm : lsadm nobody

and it can be fixed by change line 905 of functions.sh from
usermod -G $WS_GROUP lsadm
to
usermod -a -G $WS_GROUP lsadm

we'll estimate if this change has any other side effect.

however, is it a good practice?
assume you have 1000 users, will you add lsadm to all these 1000 groups?
Reply With Quote
  #5  
Old 06-14-2012, 12:49 AM
ikiji ikiji is offline
New Member
 
Join Date: Oct 2011
Posts: 7
Hi NiteWave,

Thank you.

More than happy to look at how we have it setup if you can 'recommend' a better method for securing each user's space?
Reply With Quote
  #6  
Old 06-14-2012, 01:20 AM
NiteWave NiteWave is online now
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
not sure, maybe you can refer
Virtual Host Templates -> EasyRailsWithSuEXEC
Reply With Quote
  #7  
Old 06-14-2012, 01:27 AM
ikiji ikiji is offline
New Member
 
Join Date: Oct 2011
Posts: 7
Is that going to tell us the best users/groups to run things under?

We don't plan on this server having max of more than 5 sites.

So is what we've got that bad practice?
Reply With Quote
  #8  
Old 06-14-2012, 01:35 AM
NiteWave NiteWave is online now
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
if so, your way is ok and not a problem. just searched, a user(here lsadm) belonging to max number of groups is 32 or 16. if only 5 users, I think it's ok.

please wait for our development's investigation result.
Reply With Quote
  #9  
Old 06-14-2012, 01:46 AM
ikiji ikiji is offline
New Member
 
Join Date: Oct 2011
Posts: 7
Always keen to ensure we're following best practices.

So if anyone can suggest the best way to run Litespeed?

If we set each home/user/ as 'lsadm' then they could see each other's content, hence why we did it they way we did.
Reply With Quote
  #10  
Old 06-14-2012, 08:51 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Quote:
and it can be fixed by change line 905 of functions.sh from
usermod -G $WS_GROUP lsadm
to
usermod -a -G $WS_GROUP lsadm
applied to functions.sh
Reply With Quote
Reply

Tags
groups, permissions, upgrade, vhconf

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:32 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.