Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6645567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:18:12+00:00 2026-05-26T00:18:12+00:00

I have written a PHP script which updates a SVN working copy. It works

  • 0

I have written a PHP script which updates a SVN working copy.

It works fine on my development machine (W2k3 Server)but I cannot get it to work on a production server (W2k8 Server). I’m using the latest Collabnet Subversion binaries (1.6.17).

Here’s the PHP code:

$command = 'svn update C:\inetpub\wwwroot\mysite --config-dir C:\Windows\Temp'; 

$response = array();
$handle = popen("$command 2>&1", 'r');
$read = '';
while( $read = fread( $handle, 20096 ) ) 
{
    $response[] = $read;
}
pclose( $handle );
flush();

echo '<h2>Command</h2><p> ' . $command . '</p>';
echo '<h2>Response</h2><p>' . implode( '<br />', $response ) . '</p>';

When I run the same command from the command prompt it works fine. But when I run it through IIS, I get:

svn: Can’t open file ‘C:\inetpub\wwwroot\mysite.svn\lock’: Access is denied.

Presumably I need elevated permissions but I have no idea how to implement it.

I’ve tried giving the _IUSR account full control of the folder containing svn and the C:\inetpub\wwwroot\mysite.svn\ folders but it makes no difference.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:18:12+00:00Added an answer on May 26, 2026 at 12:18 am

    Had issues just like this with SVN and Windows Server 2008. The issue is caused by the UAC stuff that typically prevents someone from changing a file if they don’t own the file. In the case of SVN, the issue was typically that one user performed the initial checkout, creating the .svn folders and associated bits. Then a different user went to svn up and got OS-level access issues about modifying the SVN database files.

    Unfortunately, the best fix we could get to was disabling UAC. Actually solved a few other problems and it really makes sense on servers. If it is running as a scheduled task then you could try “run with highest priviliges” but elevating that much makes little sense for a web app.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP script which works fine in PHP 5, but not in
Starting out with php, I have written a basic authentication script which prints out
I have written a PHP script which allows me to modify and update a
I have a php script written which calls an external command using exec which
I have written a web app in PHP which makes use of Ajax requests
I have some code I've written in PHP for consuming our simple webservice, which
I've written a PHP script that handles file downloads, determining which file is being
In one app, I have an administrative backend written in PHP, which allows to
I have found the following script which is apparently written using the javascript framework
I have written a php script that returns an arbitrary number of specific ids

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.