<VirtualHost *:80>
ServerName www.example.com
DocumentRoot /vhosts/www.example.com/public_html
DirectoryIndex index.html index.php
# Закрываем доступ к служебным папкам VCS
RedirectMatch 404 /\\.(svn|git|hg|bzr|cvs)(/|$)
<Directory /vhosts/www.example.com/public_html>
Options -Indexes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
# cd /vhosts/www.example.com/public_html
# svn co file:///var/lib/svn/repos/project1/trunk ./
# chown -R svn:apache /vhosts/www.example.com/public_html
# chmod -R 770 /vhosts/www.example.com/public_html
# id svn
uid=497(svn) gid=48(apache) groups=48(apache),497(svn)
# cat /var/lib/svn/repos/project1/hooks/post-commit
#!/bin/sh
umask 002
cd /vhosts/www.example.com/public_html && svn up
# cd /home/toster/master/
# svn co http://svn.example.net/repos/toster/ ./
Checked out revision 0.
# svn add . --force
A awk
A awk/gettime.awk
A awk/join.awk
...
A authconfig/authconfig.py
A aclocal
A aclocal/pkg.m4
# svn commit -m 'Initial commit'
...
...
...
Transmitting file data ................................
Committed revision 1.
# svn commit -m 'Add some pictures'
...
...
...
Transmitting file data ................................
Committed revision 2.
# svn ls http://svn.example.net/repos/toster/
aclocal/
anaconda/
applications/
augeas/
authconfig/
awk/
firstboot-left.png
firstboot-small.png
splash-small.png
workstation.png
# cd /home/toster/slave/
# svn co http://svn.example.net/repos/toster/ ./
...
Checked out revision 2.
# mkdir xxx
# dd if=/dev/urandom of=xxx/100mb.bin bs=1M count=100
# svn add xxx
A xxx
A (bin) xxx/100mb.bin
# svn commit -m "My private and secret data"
Adding xxx
Adding (bin) xxx/100mb.bin
Transmitting file data .
Committed revision 3.
# cd /home/toster/master/
# svn update
Updating '.':
A xxx
A xxx/100mb.bin
Updated to revision 3.
# ls -la xxx/
total 102408
drwxr-xr-x 2 root root 4096 Jan 28 21:03 .
drwxr-xr-x 10 root root 4096 Jan 28 21:03 ..
-rw-r--r-- 1 root root 104857600 Jan 28 21:03 100mb.bin
# cd /home/toster/slave/
# svn rm xxx/
D xxx
D xxx/100mb.bin
# svn commit -m "Remove my private and secret data"
Deleting xxx
Committed revision 4.
# cd /home/toster/master/
# svn update
Updating '.':
D xxx
Updated to revision 4.
# ls -la xxx
ls: cannot access xxx: No such file or directory
# svn ls http://svn.example.net/repos/toster/
aclocal/
anaconda/
applications/
augeas/
authconfig/
awk/
firstboot-left.png
firstboot-small.png
splash-small.png
workstation.png
[groups]
stat_admin=user3
report_admin=user4
[Production:/Statistic]
@stat_admin=rw
user1=r
*=
[Production:/Directors]
user2=rw
*=
[Production:/Reports]
@report_admin=rw
*=