Search code examples
phpsvn

Error when check out code from SVN server


I have SVN server to control source code version

I can checkout my code when I use TortoiseSVN or use command line.

Here is some information:

  1. SVN server enter image description here
  2. Checkout code by using TortoiseSVN in Windows enter image description here
  3. Chechout code by using commandline in Ubuntu (Web server)

I use this command

root@controller1:/var/www/onecloud# svn co --force --username hoang --password gcsvn123 http://203.162.141.79/onecloud /var/www/onecloud

enter image description here

Then I write PHP code to update version auto (don't use TortoiseSVN or use command line).

error_reporting(-1);
ini_set('display_errors', 'On');
$result= exec('svn co --force --username hoang --password gcsvn123 http://203.162.141.79/onecloud /var/www/onecloud 2>&1',$out);
print_r($out);

But when I run my code, it show this error:

Array ( [0] => svn: E155004: Run 'svn cleanup' to remove locks (type 'svn help cleanup' for details) [1] => svn: E155004: Working copy '/var/www/onecloud' locked [2] => svn: E200031: sqlite[S8]: attempt to write a readonly database [3] => svn: E200031: Additional errors: [4] => svn: E200031: sqlite[S8]: attempt to write a readonly database ) 

I have run command line svn cleanup, but it seem doesn't work.

Not:

My SVN server is 203.162.141.79
My web server is 203.162.141.26

Solution

  • I found directory .svn in my code after checkout.

    When I use these two commands:

    chmod -R 777 .svn/
    chown www-data:www-data .svn/
    

    it works.

    enter image description here