[Resolved] LSCache issue when disabling user

Status
Not open for further replies.
#1
Hey all,

I'm currently running into an issue on one of my servers where I get the following error when disabling LSCache for a user:
/home/username/public_html - Could not open input file: /usr/local/lsws/add-ons/webcachemgr/shared/lscwp_interact.php
As a note, this is a WHM/cPanel server.

I tried updating to the latest version of LiteSpeed AND LSCache but doing neither worked.

Any advice?
 
Last edited by a moderator:

mistwang

LiteSpeed Staff
#2
It could be permission problem. check if root user can access that file. if yes, check a regular user see if can access, if not, it is a permission problem.
Also, if you use CageFS, perform a force update to make sure that file is available in the user's cage.
 

Michael A

Administrator
Staff member
#3
Hi Danielle,

That script should only be accessed through WHM as root. Are you logged in as root when trying to disable?

If so and you are still having issue please pm me with WHM and ssh login details and I will look into it.

Regards,
-Michael
 
#4
Hey guys,

I tried running:
Code:
cagefsctl --force-update
cagefsctl --remount-all

But the problem persists. I am in WHM as root disabling LSCache for the users. Here is the output of stat for the file in question. As you can see, file permissions and ownership look correct.

root@server [~]# stat /usr/local/lsws/add-ons/webcachemgr/shared/lscwp_interact.php
File: `/usr/local/lsws/add-ons/webcachemgr/shared/lscwp_interact.php'
Size: 14853 Blocks: 32 IO Block: 4096 regular file
Device: fd00h/64768d Inode: 2355638 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2016-11-21 13:10:40.040983566 -0600
Modify: 2016-11-21 13:09:57.077983578 -0600
Change: 2016-11-21 13:09:57.077983578 -0600
Michael, I feel uncomfortable sharing server information since hundreds of clients reside on it. If there are any other suggestions you may have or information you need, please let me know as I'd like to try that route first.

Thank you!
Dani
 
Last edited by a moderator:
#6
maybe a open_basedir issue ?
please refer
http://blog.litespeedtech.com/2012/...en_basedir-in-the-shared-hosting-environment/

disable open_basedir for "username", see if any difference.
Thanks for the reply, but that still didn't work. :( Does anyone have any other ideas? This is a core LSCache function and my setup didn't change from when I last enabled everything, so I don't see how disabling has become an issue.

Is there an SSH command equivalent to clicking 'Disable' on the 'Manage Cache Installations' area of LSCache?
 

Michael A

Administrator
Staff member
#7
HI Danielle,

If enable was working previously with no changes then there really isn't any reason that disable should be running into problems as they use the same script.

You can try the following command as root directly to see if it works, where $user is the WordPress site owner, '.../lsws/' is replaced by the path to lsws, and $fullPathToWPDir is the path to your wordpress installation files (should contain wp-admin folder).

Code:
su $user -s /bin/bash -c "php -d disable_functions= .../lsws/add-ons/webcachemgr/shared/lscwp_interact.php disable $fullPathToWPDir"
 
#8
HI Danielle,

If enable was working previously with no changes then there really isn't any reason that disable should be running into problems as they use the same script.

You can try the following command as root directly to see if it works, where $user is the WordPress site owner, '.../lsws/' is replaced by the path to lsws, and $fullPathToWPDir is the path to your wordpress installation files (should contain wp-admin folder).

Code:
su $user -s /bin/bash -c "php -d disable_functions= .../lsws/add-ons/webcachemgr/shared/lscwp_interact.php disable $fullPathToWPDir"
Michael,

Thanks so much for the reply. With that, I get the following error:

Could not open input file: disable

Is there any way I can replace the file that's seemingly causing me problems (/usr/local/lsws/add-ons/webcachemgr/shared/lscwp_interact.php)? Or are there any other lsws files I can/should safely replace with new ones to try and fix this without interrupting site access on the server? I think that's the next step, considering nothing else has worked.
 

Michael A

Administrator
Staff member
#9
There should be a space after 'disable_functions=' before entering in the path, the error message looks like you missed that. As for replacing the file, it is added when the server is installed, you can try force reinstalling the server through our WHM plugin if the previous method still does not work.
 
#10
Michael,

Duh, sorry about that mistake. Looks like when run properly the bash command gives the same error as the PHP interface:
Could not open input file: /usr/local/lsws/add-ons/webcachemgr/shared/lscwp_interact.php
I suppose I'll try reinstalling if I can't figure out anything else.
 
Last edited by a moderator:

Michael A

Administrator
Staff member
#12
For anyone who is curious,

It turned out that the path to LiteSpeed Web Server was not made available through cageFS properly, preventing lscwp_interact from being run as the WordPress owner.

This can be fixed by running the following commands as root:

Code:
echo "/usr/local/lsws" >> /etc/cagefs/cagefs.mp
cagefsctl --remount-all
Regards,
-Michael
 
Status
Not open for further replies.
Top