This documentation describes how to setup a VFS testserver needed during development for the junit
I tried to simplify things as good as I can, e.g. this setup uses for all server the same vfs work
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:
SuSE Linux 9.3 Minimal Installation
Apache 2 Webserver (apache2-2.0.53)
Samba 3 (samba-3.0.12)
You need maven to build the local test-data structure. This is done automatically during build of VFS.
Create a user 'vfsusr' with password 'vfs/%\te:st' and home directory '/home/vfsusr'
Create the directories
and copy from your local 'target/test-data' the directories
Now your structure looks like this:
Setup a symbolic link to '/vfstest'
After you followed the steps below and setup the server ensure they
are activated and running.
This is only needed if you installed a fresh system. Otherwise simply restart them.
Create a file named '/etc/apache2/conf.d/vfstest.conf' with this content
change the permission on
Activate the WebDAV module by adding 'dav' and 'dav_fs' to the list of modules in '/etc/sysconfig/apache2'. e.g
Setup the webserver to use user-id 'vfsusr' and group 'users'. This can be done by changing the file '/etc/apache2/uid.conf'
Create the VFS user to access the Webdav resource
Create a share 'vfsusr'
Setup a 'vfsusr' with password 'vfs/%\te:st'
In '/etc/ssh/sshd_config' ensure
Ensure the server is not disabled in the xinetd configuration
Set in '/etc/xinetd.d/vsftpd'
Setup the server config: '/etc/vsftpd.conf'
Now we are finished and you can try to activate the tests by
reactivate the tests in 'build.xml'.
Search for ]]> and comment the exclude.
or use the class org.apache.commons.vfs.RunTest where you have
to adapt some properties at the top of the file and choose which test
you would like to run by comment the others.
This is the way how I debug a failed testcase.