Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have mod_ldap user authorization in my Apache, username 'test1' etc. I need to run all php scripts after authorization under user test1.

suEXEC allows script to be executed under the user that is owner of home directory,

To be clear, when I'm going to http://mysite/~test2 with suEXEC it's running as test2 and I want to run it as test1

share|improve this question

1 Answer 1

The simplest solution is to use sudo, which was created exactly for running commands as another user.

It will however require the user's password to be provided, unless you use NOPASSWD in /etc/sudoers for that user/group.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.