OpenLiteSpeed LSCache Owner Fix
Why is this needed?
OpenLiteSpeed reset or change the ownership of the LSCache folder when the OpenLiteSpeed service is restarted.
This can cause LSCache to lose the correct owner and lead to cache permission, write, or cache-generation problems for websites.
We solved this by providing an automatic LSCache ownership fix.
Install
Run:
curl -sSL https://olspanel.com/extra/lscache_owner.sh | sed 's/\r$//' | bash -s install
The script sets the correct LSCache folder ownership so it can continue working properly after OpenLiteSpeed restarts.
Uninstall
To remove the ownership fix:
curl -sSL https://olspanel.com/extra/lscache_owner.sh | sed 's/\r$//' | bash -s uninstall
If you're experiencing LSCache permission or ownership problems after restarting OpenLiteSpeed, this fix should help resolve them.