auth user and exec a node app only with apache?
- by Blame
I couldn't find an answer on the web and I'm trying for days now so I hope that someone with more experience with apache can help me out.
Iam writing an web editor and the user should be able to edit a file that is on the server in a directory the user has access to.
The problem Iam facing is that I need to authenticate against the system users (shadow/passwd).
So the user should be able to login whith a system account and then the node app which does all the logic should be started with the users rights.
I hope to get this working without any additional script and only with Apache.
I found out two things:
I can use mod_auth_pam to authenticate the user
There is a mod called suEXEC which can exec the node app with a specified user
The problem is that I have to hard code which user is used by suEXEC but I want to decide when the user logs in.
Is there any way to authenticate a user against the shadow/passwd and then exec a prog with the users rights?
I dont want to run the node app as root and the user should only be able to access his own files.
Any help would be appreciated!
Thanks,
Kodak