[VFS] Root to user directory not /

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[VFS] Root to user directory not /

Animate
I am probably missing something obvious, but I want to
have ftp://user:[hidden email]/ 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [VFS] Root to user directory not /

Mario Ivankovits
Animate wrote:
>I am probably missing something obvious, but I want to
>have ftp://user:[hidden email]/ 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:[hidden email]/~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:[hidden email]//fsroot" isnt a valid url.


---
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [VFS] Root to user directory not /

Animate
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 <[hidden email]> wrote:

> Animate wrote:
> >I am probably missing something obvious, but I want
> to
> >have ftp://user:[hidden email]/ 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:[hidden email]/~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:[hidden email]//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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [VFS] Root to user directory not /

Mario Ivankovits
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [VFS] Root to user directory not /

Animate
Wow, how cool is that? I'll download and test
tomorrow.

Thanks for the quick response.

--- Mario Ivankovits <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [VFS] Root to user directory not /

Animate
In reply to this post by Mario Ivankovits
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 <[hidden email]> 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:
> [hidden email]
> For additional commands, e-mail:
> [hidden email]
>
>



               
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [VFS] Root to user directory not /

Mario Ivankovits
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [VFS] Root to user directory not /

Mario Ivankovits
In reply to this post by Animate
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [VFS] Root to user directory not /

Animate
In reply to this post by Mario Ivankovits
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 <[hidden email]> 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:
> [hidden email]
> For additional commands, e-mail:
> [hidden email]
>
>



               
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [VFS] Root to user directory not /

Animate
In reply to this post by Mario Ivankovits
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 <[hidden email]> 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:
> [hidden email]
> For additional commands, e-mail:
> [hidden email]
>
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [VFS] Root to user directory not /

Mario Ivankovits
Hi!
>The new nightly worked. I tried the following tests
>  
Great work - thanks!

Time for the next RC :-)

---
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]