elleFlorio / svn-docker

Lightweight Docker image to build a container running an SVN server
MIT License
144 stars 101 forks source link

svnadmin: Error: Could not copy configuration file template #34

Closed Basti-Fantasti closed 2 years ago

Basti-Fantasti commented 3 years ago

Hi,

I've set up your docker container using docker-compose on my Synology diskstation.

When I run it and want to access the svnadmin I get the following error message:

Error: Could not copy configuration file template. Require write permission (777) to "data" folder and all containing files.
#0 /opt/svnadmin/index.php(20): include_once()
#1 {main}

folder and file privileges should be good. Here's my compose file:

2021-06-11 10_27_46-server1 local - PuTTY

and here's the directory structure showing the privileges

2021-06-11 10_27_18-server1 local - PuTTY

When starting the container I also found out, that the empty passwd file was missing. It's inside your docker file but it was not created or copied to the configured svn_config dir (./svn_config:/etc/subversion)

I had to manually add it as well as the subversion-access-control file

If you need any further details I'm glad to help!

Basti-Fantasti commented 3 years ago

I've digged a bit deeper into it...

in the svnadmin config.inc.php it tries to do the following:

// Does the config.ini file exists?
if (!file_exists("./data/config.ini"))
{
  if (!copy("./data/config.tpl.ini", "./data/config.ini"))
    throw new Exception("Could not copy configuration file template. Require write permission (777) to \"data\" folder and all containing files.");
  header("Location: settings.php");
  exit(0);
}

But this source template file is missing
Basti-Fantasti commented 3 years ago

I manually downloaded the svnadmin release listed in the docker file and copied the .htaccess file and the config.tpl.ini to the data folder and now I see the UI.

I think I can continue from there 😄

It sometimes help just to note it down somewhere 👍

elleFlorio commented 2 years ago

Hey! 😄 Thank you very much for this, really appreciated! ❤️

ted423 commented 2 years ago

I think it's maybe need write in Readme, because I had't use svnadmin before those file is config file and will not be placed in docker it cause a lot of trouble for first-time users because they don't know what they need

mkikets99 commented 2 years ago

@ted423, i am fully agree with you... If enyone will wonder how to solve it :

  1. Connect /opt/svnadmin/data container to any folder
  2. Make it chmod 777 to be sure...
  3. Enter that folder and grab files from github of SVNAdmin (or just simply run this 2 lines)
    wget https://raw.githubusercontent.com/mfreiholz/iF.SVNAdmin/master/data/.htaccess
    wget https://raw.githubusercontent.com/mfreiholz/iF.SVNAdmin/master/data/config.tpl.ini