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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > 4.0.10 suEXEC

Reply
 
Thread Tools Display Modes
  #1  
Old 09-05-2009, 10:27 AM
gschultz gschultz is offline
Member
 
Join Date: Oct 2008
Posts: 13
Default 4.0.10 suEXEC

We were using LiteSpeed for a while. To change configuration files we used to:
(1) edit httpd_config.xml and domain.xml files locally
(2) upload .xml files to the server via ssh
(3) restart the server via ssh

This works fine for 4.0.9 and previous versions but when we do it with 4.0.10 the admin login page shows session errors though the server starts correctly.

These are the permissions of uploaded files:
httpd_config.xml rw-r-----
domain.xml rw-------

What have we add to the script in order to avoid the session errors? Should we change the ownership of sess_* files?
Reply With Quote
  #2  
Old 09-05-2009, 11:22 AM
anewday anewday is offline
Senior Member
 
Join Date: Nov 2007
Location: New York
Posts: 723
Why don't you use the admin console to edit the configuration?
Reply With Quote
  #3  
Old 09-05-2009, 11:34 AM
gschultz gschultz is offline
Member
 
Join Date: Oct 2008
Posts: 13
Because we have a script to create redirects and rewrite rules according to changes made locally.
Reply With Quote
  #4  
Old 09-05-2009, 08:14 PM
auser auser is offline
Senior Member
 
Join Date: Mar 2009
Posts: 119
Quote:
Originally Posted by gschultz View Post
These are the permissions of uploaded files:
httpd_config.xml rw-r-----
domain.xml rw-------
please give the output of "ls -l" of current/parent directory,should be permission issues.
Reply With Quote
  #5  
Old 09-05-2009, 08:47 PM
gschultz gschultz is offline
Member
 
Join Date: Oct 2008
Posts: 13
cd /opt/lsws/conf
ls -l

drwx------ 2 lsadm lsadm 4096 Feb 4 2009 cert
-rw-r----- 1 lsadm lsadm 1072 Sep 5 19:10 domain1-com.xml
-rw-r----- 1 lsadm lsadm 1072 Sep 5 19:10 domain2-com.xml
-rw------- 1 lsadm lsadm 21187 Sep 5 19:10 httpd_config.xml
-rw------- 1 root root 256 Sep 5 19:08 license.key
-rw------- 1 lsadm lsadm 256 Aug 29 15:13 license.key.old
-rw------- 1 lsadm lsadm 3773 Feb 4 2009 mime.properties
-rw-r--r-- 1 root root 20 Sep 5 19:08 serial.no
drwx------ 2 lsadm lsadm 4096 Feb 4 2009 templates

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

cd ..
ls -l
drwxr-xr-x 9 root root 4096 Sep 5 03:02 add-ons
drwxr-xr-x 12 root root 4096 Sep 5 19:08 admin
drwx------ 8 lsadm lsadm 4096 Sep 4 08:08 autoupdate
drwxr-xr-x 2 root root 4096 Sep 5 19:08 bin
drwxrwxrwx 4 root root 4096 Sep 5 2009 conf
drwxr-xr-x 7 root root 4096 Feb 4 2009 DEFAULT
drwxr-xr-x 2 root root 4096 Feb 4 2009 docs
drwxr-xr-x 2 root root 4096 Apr 17 20:29 fcgi-bin
drwxr-xr-x 2 root root 4096 Feb 4 2009 lib
-rw-r--r-- 1 root root 6959 Sep 5 19:08 LICENSE
-rw-r--r-- 1 root root 2214 Sep 5 19:08 LICENSE.OpenLDAP
-rw-r--r-- 1 root root 6279 Sep 5 19:08 LICENSE.OpenSSL
-rw-r--r-- 1 root root 3208 Sep 5 19:08 LICENSE.PHP
drwxr-xr-x 2 root root 12288 Sep 5 22:39 logs
drwxr-xr-x 2 root root 4096 Feb 4 2009 php
drwx------ 2 lsadm lsadm 4096 Feb 4 2009 phpbuild
drwxr-xr-x 3 root root 4096 Feb 4 2009 share
-rw-r--r-- 1 root root 7 Sep 5 19:08 VERSION
Reply With Quote
  #6  
Old 09-05-2009, 09:24 PM
auser auser is offline
Senior Member
 
Join Date: Mar 2009
Posts: 119
Quote:
Originally Posted by gschultz View Post
cd /opt/lsws/conf
ls -l

-rw-r----- 1 lsadm lsadm 1072 Sep 5 19:10 domain1-com.xml
-rw-r----- 1 lsadm lsadm 1072 Sep 5 19:10 domain2-com.xml
-rw------- 1 lsadm lsadm 21187 Sep 5 19:10 httpd_config.xml

cd ..
ls -l
drwxrwxrwx 4 root root 4096 Sep 5 2009 conf
so only user/group lsadm can read httpd_config.xml.
what user to run lshttpd?
you can check this by "ps -ef|grep lshttpd"
Reply With Quote
  #7  
Old 09-05-2009, 09:24 PM
gschultz gschultz is offline
Member
 
Join Date: Oct 2008
Posts: 13
Got it!

Here is the solution. It could be useful for anyone else.

After uploading .xml config files via ssh (as root), ownerships and permissions must be adjusted.

chown lsadm:lsadm /opt/lsws/conf/*.xml
chmod 600 /opt/lsws/conf/*.xml
chown lsadm:lsadm /opt/lsws/conf
chmod 700 /opt/lsws/conf
killall -9 lshttpd
/opt/lsws/bin/lswsctrl start

That's all. No session errors.
Reply With Quote
  #8  
Old 09-05-2009, 08:37 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
the admin console run as lsadm:lsadm for 4.0.10, no long as the user that web sever run as for better security. You should change your upload file permission accordingly.

For PHP session error, check the permission of lsws/admin/tmp and the session file in it. should be owned by lsadm for 4.0.10.
Reply With Quote
Reply

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 05:49 AM.



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