Running a perl script under Cygwin from Apache (for Windows) I would
like to switch users to another user. I know that this is probably hard
if not impossible to do however I have a need. I want to be able to
update a file and AFAICT because Apache (started as a service) is
running as SYSTEM (or something like that) spawns off my perl script as
that user and thus does not allow me to write to data files unless the
file is set world writable (not a very good thing).
Is there a way to do this in Perl? What I would like to do is:
if (ValidateUser $user) {
SwitchUser $user;
PerformUserTasks;
SwitchUser $previous_user;
} else {
print "Invalid user $user\n";
} # if
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/