You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Animate <an...@yahoo.com> on 2005/08/02 19:16:49 UTC
[VFS] Root to user directory not /
I am probably missing something obvious, but I want to
have ftp://user:pass@ftp.xyz.com/ to go to the default
directory for user rather than the root for the ftp
server.
Is that possible with VFS?
Thanks.
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [VFS] Root to user directory not /
Posted by Animate <an...@yahoo.com>.
Works fine with the root. Sorry on the public server
--
this is all behind a firewall.
Here's the trace. Seems it could not find the file at
all:
org.apache.commons.vfs.FileSystemException: Could not
read from "ftp://hidden:hidden@hidden/hidden.xml"
because it is a not a file.
at
org.apache.commons.vfs.provider.AbstractFileObject.getInputStream(AbstractFileObject.java:1032)
at
org.apache.commons.vfs.provider.DefaultFileContent.getInputStream(DefaultFileContent.java:281)
at
com.cannedsite.xslt.test.TestCommonsVfs.main(TestCommonsVfs.java:34)
--- Mario Ivankovits <ma...@ops.co.at> wrote:
> Animate wrote:
> >I also tried against the Solaris server just to
> >double-check that it still worked. The old way
> >works (~username), but with the option, I could not
>
> >make it work without the ~username (received a not
> >a file error). That's fine for my purposes, but
> >providing the info anyway.
> >
> Could you please provide the stacktrace. And what
> happens if you do not
> use the new option and the root ftp-url e..g
> ftp://your.solaris.host only.
>
> Do you know a public solaris ftp server where I can
> try it?
>
> ---
> Mario
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-user-help@jakarta.apache.org
>
>
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [VFS] Root to user directory not /
Posted by Mario Ivankovits <ma...@ops.co.at>.
Animate wrote:
>I also tried against the Solaris server just to
>double-check that it still worked. The old way
>works (~username), but with the option, I could not
>make it work without the ~username (received a not
>a file error). That's fine for my purposes, but
>providing the info anyway.
>
Could you please provide the stacktrace. And what happens if you do not
use the new option and the root ftp-url e..g ftp://your.solaris.host only.
Do you know a public solaris ftp server where I can try it?
---
Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [VFS] Root to user directory not /
Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi!
>The new nightly worked. I tried the following tests
>
Great work - thanks!
Time for the next RC :-)
---
Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [VFS] Root to user directory not /
Posted by Animate <an...@yahoo.com>.
The new nightly worked. I tried the following tests
(u, p, and h are user, password, and host
respectively, f is full path from true root):
userDirIsRoot form result
------------- --------------------- --------
true ftp://u:p@h/file.xml file found
false ftp://u:p@h/file.xml failed
true ftp://u:p@h/f/file.xml failed
false ftp://u:p@h/f/file.xml file found
true ftp://u:p@h/~u/file.xml file found
false ftp://u:p@h/~u/file.xml file found
Interesting that ~user worked both ways, but that
makes
sense.
Also, rechecked the Windows side and it was fine as
well.
--- Mario Ivankovits <ma...@ops.co.at> wrote:
> Animate wrote:
> >I could not
> >make it work without the ~username (received a not
> >a file error). That's fine for my purposes, but
> >providing the info anyway.
> >
> Maybe I got it. Could you please recheck the next
> nightly.
>
> Thanks alot!
>
> ---
> Mario
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-user-help@jakarta.apache.org
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [VFS] Root to user directory not /
Posted by Mario Ivankovits <ma...@ops.co.at>.
Animate wrote:
>I could not
>make it work without the ~username (received a not
>a file error). That's fine for my purposes, but
>providing the info anyway.
>
Maybe I got it. Could you please recheck the next nightly.
Thanks alot!
---
Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [VFS] Root to user directory not /
Posted by Animate <an...@yahoo.com>.
I downloaded the new version and tested. Windows
server
now works great.
I also tried against the Solaris server just to
double-check that it still worked. The old way
works (~username), but with the option, I could not
make it work without the ~username (received a not
a file error). That's fine for my purposes, but
providing the info anyway.
Again, thanks for the blazing fast response. Extremely
cool package. Looking forward to the release.
--- Mario Ivankovits <ma...@ops.co.at> wrote:
> Animate wrote:
> >Is it possible in some distant release to add an
> >argument someplace to permit this?
> >
> The next nightly allows you to configure the
> ftp-filesystem to use the
> user home as root:
>
> FileSystemOptions opts = new
> FileSystemOptions();
>
>
FtpFileSystemConfigBuilder.getInstance().setUserDirIsRoot(opts,
>
> true);
> FileObject fo =
>
VFS.getManager().resolveFile("ftp://vfsusr:pass@host/",
> opts);
>
> Some additional testing is needet but it looks good.
>
> ---
> Mario
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-user-help@jakarta.apache.org
>
>
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [VFS] Root to user directory not /
Posted by Animate <an...@yahoo.com>.
Wow, how cool is that? I'll download and test
tomorrow.
Thanks for the quick response.
--- Mario Ivankovits <ma...@ops.co.at> wrote:
> Animate wrote:
> >Is it possible in some distant release to add an
> >argument someplace to permit this?
> >
> The next nightly allows you to configure the
> ftp-filesystem to use the
> user home as root:
>
> FileSystemOptions opts = new
> FileSystemOptions();
>
>
FtpFileSystemConfigBuilder.getInstance().setUserDirIsRoot(opts,
>
> true);
> FileObject fo =
>
VFS.getManager().resolveFile("ftp://vfsusr:pass@host/",
> opts);
>
> Some additional testing is needet but it looks good.
>
> ---
> Mario
>
__________________________________
Yahoo! Mail for Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [VFS] Root to user directory not /
Posted by Mario Ivankovits <ma...@ops.co.at>.
Animate wrote:
>Is it possible in some distant release to add an
>argument someplace to permit this?
>
The next nightly allows you to configure the ftp-filesystem to use the
user home as root:
FileSystemOptions opts = new FileSystemOptions();
FtpFileSystemConfigBuilder.getInstance().setUserDirIsRoot(opts,
true);
FileObject fo =
VFS.getManager().resolveFile("ftp://vfsusr:pass@host/", opts);
Some additional testing is needet but it looks good.
---
Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [VFS] Root to user directory not /
Posted by Animate <an...@yahoo.com>.
Mostly Windows :-(
I did try this against a Solaris ftp server and it
works great. But, unfortunately, the problem is
against the Windows ftp server.
There is some odd configuration that I cannot get to
the folder from the top level on this particular
server. Otherwise, I would just full path it.
I may have to get my admin to change the configuration
to expose a full path.
Is it possible in some distant release to add an
argument someplace to permit this?
Thanks.
--- Mario Ivankovits <ma...@ops.co.at> wrote:
> Animate wrote:
> >I am probably missing something obvious, but I want
> to
> >have ftp://user:pass@ftp.xyz.com/ to go to the
> default
> >directory for user rather than the root for the ftp
> >server.
>
> Which OS use the ftp server?
> Try "ftp://user:pass@ftp.xyz.com/~user/" which might
> do what you want.
> The problem is we do not know if you would like to
> access to root of the
> user-home or the root of the filesystem and
> "ftp://user:pass@ftp.xyz.com//fsroot" isnt a valid
> url.
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: [VFS] Root to user directory not /
Posted by Mario Ivankovits <ma...@ops.co.at>.
Animate wrote:
>I am probably missing something obvious, but I want to
>have ftp://user:pass@ftp.xyz.com/ to go to the default
>directory for user rather than the root for the ftp
>server.
>
Which OS use the ftp server?
Try "ftp://user:pass@ftp.xyz.com/~user/" which might do what you want.
The problem is we do not know if you would like to access to root of the
user-home or the root of the filesystem and
"ftp://user:pass@ftp.xyz.com//fsroot" isnt a valid url.
---
Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org