Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


.exe call within perl script not executing properly within apache

Posted on 2003-03-16
Medium Priority
Last Modified: 2010-08-05
I have a fairly simple script that is supposed to run rcs's ci ... but
the files are never created.

The perl script is

print "Content-type: text/html\n\n";
system "/progra~1/rcs/bin/win32/ci.exe",  "-l -t-\"\"

In the log file I get
[Sun Mar 16 10:22:26 2003] [error] [client]
pages/RCS/WikiSandbox  <--  pages/WikiSandbox

but no file is actually created.

I have my apache server set up as a virtual host and the perl script
which runs this command runs fine, its just this command doesn't run

When I run this script from the command line in the cgi-bin directory
it works perfectly ... the output from the command line is shown below ...

C:\Documents and Settings\bkotch\My Documents\Personal
Wiki\cgi-bin>perl saveExa
pages/RCS/WikiSandbox  <--  pages/WikiSandbox
initial revision: 1.1

Question by:brettkotch
  • 6
  • 4
LVL 51

Expert Comment

ID: 8150991
does the web-server user hav permissions to write in the pages/RCS/WikiSandbox and pages/WikiSandbox directory?

Author Comment

ID: 8152124
Hmmm. I don't know the answer but I can offer my configuration. The server starts as a service with the "Log On As" set to "Local System".

Author Comment

ID: 8152551
From the config point of view, I have basically made no changes to httpd except for adding the following virtual host ...

# Use name-based virtual hosting.
#NameVirtualHost *

Listen 9090


# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.

     DocumentRoot "/Documents and Settings/bkotch/My Documents/Personal Wiki/"
     ScriptAlias /cgi-bin/ "/Documents and Settings/bkotch/My Documents/Personal Wiki/cgi-bin/"
     ErrorLog "C:\Documents and Settings\bkotch\My Documents\Personal Wiki\errorlog"
     CustomLog "C:\Documents and Settings\bkotch\My Documents\Personal Wiki\customlog" custom

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

LVL 51

Accepted Solution

ahoffmann earned 2000 total points
ID: 8154063
check with xcacls.exe if the directory can be access/written by the user you have specified in "Log on as"

Author Comment

ID: 8156754
c:\Documents and Settings\bkotch\My Documents\Personal Wiki LNHOLDINGS\bkotch:F
                                                            NT AUTHORITY\SYSTEM:F
                                                            NT AUTHORITY\SYSTEM:(OI)(CI)(IO)F

Seems like this shouldn't be a problem!?

Author Comment

ID: 8157313
OK, I just realized that when I run apache not as a service the script works properly. When I run apache as a service, it doesn't work properly. So I guess the question is how can I run apache as a service and still get the same functionality? IS that with xcacls? and if it is ... how so?


Author Comment

ID: 8157381
change the service from local system to myself ... that seemed to work!? does that make sense? and is that the preferred way of doing it?
LVL 51

Expert Comment

ID: 8158241
I resigned from any M$ products years ago, so cannot give valuable hints about "what's best".
But as I said before, just give the user you use as "Log on as" read and execute permissions on the necessary directories and files. xcacls.exe can do this too (take care, it's tricky to use).

Author Comment

ID: 8158640
Although this answer wasn't exactly what I would up implementing, the answer was critical in me solving the problem. In the end, I just changed the log on as person from system to myself so I don't need to deal with the whole directory permission thing ... Thanks!
LVL 51

Expert Comment

ID: 8159106
there're always sevaral ways to do it, even with M$ ;-)
Thanks, and happy sufin'

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses
Course of the Month14 days, 13 hours left to enroll

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question