delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
X-Injected-Via-Gmane: | http://gmane.org/ |
To: | cygwin AT cygwin DOT com |
From: | Andrew DeFaria <ADeFaria AT Salira DOT com> |
Subject: | setuidperl |
Date: | Fri, 28 Feb 2003 14:46:52 -0800 |
Lines: | 18 |
Message-ID: | <3E5FE6DC.3050305@Salira.com> |
Mime-Version: | 1.0 |
X-Complaints-To: | usenet AT main DOT gmane DOT org |
User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 |
X-Accept-Language: | en-us, en, ru, zh |
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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |