This is surprisingly a very difficult problem to solve.
I want to allow my Linux users to login to Apache2 and have access to their own directory(ies) only. I've managed to get Linux users to authenticate to Apache2 using PAM and that works great.
However, allowing access to their own directories have proved to be a real challenge.
The way Apache2 runs as a common user prevents individual file permission use as the logged in user runs as the common Apache2 user.
I would prefer not to run Apache2 as root and writing a module that does setuid(logged in user) due to security concerns.
Is there a way to allow an apache2 logged in user to access a specific directory dynamically?
Thank you, Caesar.