Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have my repository in

/var/local/svn/my_repository

It is owned by

www-data:www-data

Now I want to create the initial repository structure, currently I am using

sudo svn mkdir file:///var/local/svn/my_repository/{trunk,tags,branches} -m "initial directory structure"

Using this, I assume the directories trunk, tags and branches are owned by root?

  • Is this maybe a problem later on when using the repository?
  • How to create the initial repository structure so trunk, branches and tags are owned by www-data:www-data? Any way to do this without using the http:// url which requires me to authenticate first?

Thanks for any hint!

share|improve this question

1 Answer 1

You should not need to use sudo to run svn mkdir. The repository has its own permissions, but subversion should handle those for you; the subversion command line interface (or any other interface such as Tortoise SVN) should be public and should not require superuser access to use. When you check files out, they should be owned by you.

svn mkdir runs in two different modes: it can act directly on a URL, in which case the it also commits the new directory, or it can act on a local working copy. Here's what svn help mkdir has to say on the subject:

mkdir: Create a new directory under version control.
usage: 1. mkdir PATH...
       2. mkdir URL...

  Create version controlled directories.

  1. Each directory specified by a working copy PATH is created locally
    and scheduled for addition upon the next commit.

  2. Each directory specified by a URL is created in the repository via
    an immediate commit.

  In both cases, all the intermediate directories must already exist,
  unless the --parents option is given.

If you're not seeing the results that you want when you try running svn mkdir URL, try checking the repository out, running svn mkdir to create the tags/branches/trunk, then committing the changes. At the very least, this should give you more information if anything goes wrong.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.