This documentation describes how to setup a VFS testserver needed during development for the junit tests.
I tried to simplify things as good as I can, e.g. this setup uses for all server the same vfs work
directory.
Thus it is needed to setup apache to use user 'vfsusr' instead of 'wwwrun'.
Based on this description it should be possible for you to avoid this "insecurity" if needed.
I created it during setup a fresh server based on the following components:
useradd -p vfsusr -m vfsusr
code,read-tests
/vfstest
/vfstest/write-tests
/vfstest/read-tests
/vfstest/read-tests/emptydir
/vfstest/read-tests/file1.txt
/vfstest/read-tests/dir1
/vfstest/read-tests/dir1/file1.txt
/vfstest/read-tests/dir1/file2.txt
/vfstest/read-tests/dir1/file3.txt
/vfstest/read-tests/dir1/subdir1
/vfstest/read-tests/dir1/subdir1/file1.txt
/vfstest/read-tests/dir1/subdir1/file2.txt
/vfstest/read-tests/dir1/subdir1/file3.txt
/vfstest/read-tests/dir1/subdir2
/vfstest/read-tests/dir1/subdir2/file1.txt
/vfstest/read-tests/dir1/subdir2/file2.txt
/vfstest/read-tests/dir1/subdir2/file3.txt
/vfstest/read-tests/dir1/subdir3
/vfstest/read-tests/dir1/subdir3/file1.txt
/vfstest/read-tests/dir1/subdir3/file2.txt
/vfstest/read-tests/dir1/subdir3/file3.txt
/vfstest/read-tests/empty.txt
/vfstest/read-tests/file%.txt
/vfstest/code
/vfstest/code/sealed
/vfstest/code/sealed/AnotherClass.class
/vfstest/code/ClassToLoad.class
ln -s /vfstest /home/vfsusr/vfstest
find /vfstest -print0 | xargs -0 chown vfsusr.users
insserv xinetd
insserv apache2
insserv smb
insserv nmb
/etc/rc.d/xinetd restart
/etc/rc.d/apache2 restart
/etc/rc.d/smb restart
/etc/rc.d/nmb restart
#
# VFSTEST
#
Alias /vfstest /vfstest/
DAVLockDB /var/lib/apache2/dav.lockDB
DAVMinTimeout 600
<Directory /vfstest>
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Location />
DAV On
Options Indexes MultiViews
AllowOverride None
AuthType Basic
AuthName vfstest_zone
AuthUserFile /etc/apache2/passwd
<Limit PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
Require user vfsusr
</Limit>
</Location>
chown vfsusr.users /var/lib/apache2
APACHE_MODULES="access actions alias auth auth_dbm autoindex cgi dir env expires include log_config
mime negotiation setenvif ssl suexec userdir php4 php5 dav dav_fs"
User vfsusr
Group users
htpasswd2 -cmb /etc/apache2/passwd vfsusr 'vfs/%\te:st'
[vfsusr]
comment = VFS Test Directory
path = /home/vfsusr
guest ok = yes
writable = yes
smbpasswd -a vfsusr
disable=no
write_enable=YES
local_enable=YES
<!-- tests disabled --> and comment the exclude.
<!-- tests disabled
<exclude name="**/*.java">
</exclude>
-->