Apparent Error in handling of symlinks in homedir paths.

#1
I sent this to bug@litespeedtech.com but since I have received no response in over a week, I will post it here as well.

---


It appears that litespeed is caching the 'resolved' path for the homedir.

If I have the homedir for a site set to /home/site/htdocs, and /home/site/dev and /home/site/prod containing files for the site. Creating a sybolic link from /home/site/dev to /home/site/htdocs in order to load the files in 'dev' as the homedir. Now I want to switch to 'prod' as the website, so I remove the htdocs symlink, and make a new symlink form /home/site/prod to /home/site/htdocs. Litespeed still loads/serves the files from 'dev'.

Restarting litespeed solves the problem.

This behavior was experienced on a litespeed-std install (no caching), and an litespeed-ent (with caching disabled), if caching was enabled, I could see this behavior as a result of the caching, but neither of these servers have caching enabled.

---

Just to add additional info

The std version was: v4.0.20
The ent version was: v4.0.16

---

James Mackie
EZProvider Networks, Inc.
http://www.ezp.net
1.888.397.7853
 

mistwang

LiteSpeed Staff
#2
Thank you for the bug report.
It is as designed, for better performance, LiteSpeed follows symbolic links for document root directories while loading the configuration during LSWS startup, instead of doing it for each request.
It can be easily addressed with a graceful restart.
 
#3
Thank you for the bug report.
It is as designed, for better performance, LiteSpeed follows symbolic links for document root directories while loading the configuration during LSWS startup, instead of doing it for each request.
It can be easily addressed with a graceful restart.
Not for clients on a shared environment who are using symlinks to manage their sites folders.

This is a common practice, and as litespeed is a 'drop-in-replacement' for apache, the apache style functionality should, at the very least, have an option to be enabled. In reality if 'follow symlinks' is enabled in the webserver configuration, symlinks SHOULD be followed, not cached and require a server restart to enable a change in them.

If you want the performance of not resolving symlinks, then dont use symlinks. Symlinks are used for a reason. If they are used they need to be referenced.
 
Top