简体   繁体   中英

SVN(subversion) creating repository

First of all I have just an one day experience with svn so sorry if my question is too simple to ask. Here is my question: while I've searched on the net I realized that the following code block creates the repository for me.

$ sudo mkdir /home/svn
   $ cd /home/svn
   $ sudo mkdir myproject

The SVN repository can be created using the following command:

 $ sudo svnadmin create /home/svn/myproject

And use the following commands to correct file permissions:

 $ cd /home/svn
   $ sudo chown -R www-data:subversion myproject
   $ sudo chmod -R g+rws myproject

I'm fine with these lines except the one

$ sudo chown -R www-data:subversion myproject

According to what I learned, it changes the ownership status of myproject from root to www-data:subversion . However, I don't understand why it is necessary and what is www-data . By the way I'm using linux.

www-data is the default username of apache service in some linux distros.

In many default installations, subversion is served by apache server. apache cannot serve file which he has no access to. Therefore, you should change the ownership of the repo to www-data .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM