Hi Sam:
The example snippet uses in memory file system (ram://). I wanted to
use "file://" protocol for my use, so I used following lines of code to
set the "root" for my file system.
------------
// Create FileSystem Factory (VFS)
VfsFileSystemFactory fsFactory = new VfsFileSystemFactory();
fsFactory.getAuthenticator().setVfsType("virtual");
fsFactory.getAuthenticator().setFactory(fileSystemMgrFactory);
fsFactory.getAuthenticator().*setVfsRoot("file:///C:://Temp");*
// Prepare Root Folder
FileObject rootDir = fsMgr.*resolveFile("file:///C://Temp");*
fsMgr.createVirtualFileSystem(rootDir);
-------------
You can replace "c://temp" to any appropriate folder on your system.
Further, the users' home directories can be set with respect to the root
directory (using variable like ${user}).
Hope this helps.
Thanks,
Nilesh.
On 1/7/2012 1:29 PM, Sam Mizanin wrote:
Hey Nilesh,
That is great. But i lost on the part where you said that you replaced "ram" with
"file". Can you tell me what did u do in more detail if that's not a problem? I tried
this VFS bridge for sometime but was unsuccessfull. I later on configured my own FileSystemView
which seemed to be much easier.
Cheers,
Sam
________________________________
From: Nilesh Apte<nilesh.apt...@gmail.com>
To: ftpserver-users@mina.apache.org
Sent: Friday, 6 January 2012, 16:55
Subject: Re: Accessing Files from other users home folder?
Hi Sam:
Following code snippet helped me. I modified it to use "file" protocol
instead of "ram" mentioned in the snippet.
http://snipt.org/kpomo/
Found this posted by someone on this mailing list.
Thanks,
Nilesh.
On 1/5/2012 10:54 PM, Sam Mizanin wrote:
Hey Nilesh,
I would like to know how did u embed the VFS Ftpserver bridge with ApacheFtp?
Cheers,
Sam
________________________________
From: Nilesh Apte<nilesh.apt...@gmail.com>
To: ftpserver-users@mina.apache.org
Sent: Thursday, 5 January 2012, 11:42
Subject: Re: Accessing Files from other users home folder?
Hi David:
Thanks for the suggestions. Sorry for not replying earlier but it took
me a while to attempt the VFS thing.
For now I think VFS FTPServer Bridge will do it for me. It (The bridge)
allows you to set "root directory" for the virtual file system, which
can be parent to all users' home directories.
Thanks to you and Gary for the pointers.
Nilesh.
On 12/15/2011 7:43 PM, David Latorre wrote:
Hello,
You can use symbolic links as gary bell suggested.
Another option is that you replace our default FileSystem implementation
with the one provided by the "VFS Utils Project", VFS FTPServer Bridge
http://vfs-utils.sourceforge.net/ftpserver/index.html
If I'm not wrong, in one of its operation modes, you are not restricted to
the user's home directory.
You can always develop your own 'Filesystem' implementation :-)
2011/12/15 Nilesh Apte<nilesh.apt...@gmail.com>
Hi:
Can a ftp user access a file from other ftp users' home directory (or sub
directory)?
For example,
1. UserA has his home directory as /home/UserA
2. UserB has his home directory as /home/UserB
3. UserA has a file at following folder location,
*/home/UserA/documents/test.**txt*
4. When UserB connect to apache ftp server, he will see "/" (which maps to
/home/UserB) as his root directory.
5. Can UserB issue "*GET /home/UserA/documents/test.**txt*" to retrieve
the file?
I tried "running ftp server stand alone in 5 minutes" link, and this seems
to be not supported out of the box.
I get "550 ... : No such file or directory" error.
What is the recommended/best way to share files between various ftp users?
Thanks,
Nilesh.