.exe call within perl script not executing properly within apache

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-\"\"
pages/WikiSandbox";


In the log file I get
[Sun Mar 16 10:22:26 2003] [error] [client 10.0.3.134]
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
properly.

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
mple.pl
pages/RCS/WikiSandbox  <--  pages/WikiSandbox
initial revision: 1.1
done

brettkotchAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ahoffmannCommented:
does the web-server user hav permissions to write in the pages/RCS/WikiSandbox and pages/WikiSandbox directory?
0
brettkotchAuthor Commented:
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".
0
brettkotchAuthor Commented:
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

NameVirtualHost 10.0.3.134: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.
#

<VirtualHost 10.0.3.134:9090>
     ServerName 10.0.3.134:9090
     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
</VirtualHost>



0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

ahoffmannCommented:
check with xcacls.exe if the directory can be access/written by the user you have specified in "Log on as"
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
brettkotchAuthor Commented:
c:\Documents and Settings\bkotch\My Documents\Personal Wiki LNHOLDINGS\bkotch:F
                                                            LNHOLDINGS\bkotch:(OI)(CI)(IO)F
                                                            NT AUTHORITY\SYSTEM:F
                                                            NT AUTHORITY\SYSTEM:(OI)(CI)(IO)F
                                                            BUILTIN\Administrators:F
                                                            BUILTIN\Administrators:(OI)(CI)(IO)F

Seems like this shouldn't be a problem!?
0
brettkotchAuthor Commented:
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?

0
brettkotchAuthor Commented:
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?
0
ahoffmannCommented:
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).
0
brettkotchAuthor Commented:
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!
0
ahoffmannCommented:
there're always sevaral ways to do it, even with M$ ;-)
Thanks, and happy sufin'
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.