DFS and NetworkExplorer

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

DFS and NetworkExplorer

Mike Streeton

Does Network Explorer work with windows DFS  file systems, we are trying to access one, but keep getting unknown host, what was confusing us was the virtual dfs server is the same name as the domain. So it now appears to be accessing the right virtual machine, but not allowing access, any ideas?

 

Thanks

 

Mike

 

www.ardentia.com the home of NetSearch

 

Reply | Threaded
Open this post in threaded view
|

Re: DFS and NetworkExplorer

Thomas Bley
Hi,

I've written the IntegraTUM WebDisk. It is similar to the network
explorer, but has some more features like handling zip files, view
permissions, etc.
It uses jCIFS 1.2.9 plus some patches for permissions, last access time.
I tested it with DFS from Samba 3.0.x and Windows 2003, so might also
try it:

http://www.simple-groupware.de/cms/index.php?n=WebDisk.IntegraTUMWebDisk

bye,
Thomas


Mike Streeton wrote:

>
> Does Network Explorer work with windows DFS  file systems, we are
> trying to access one, but keep getting unknown host, what was
> confusing us was the virtual dfs server is the same name as the
> domain. So it now appears to be accessing the right virtual machine,
> but not allowing access, any ideas?
>
>  
>
> Thanks
>
>  
>
> Mike
>
>  
>
> www.ardentia.com <http://www.ardentia.com> the home of NetSearch
>
>  
>

Reply | Threaded
Open this post in threaded view
|

Re: DFS and NetworkExplorer

Michael B Allen-4
In reply to this post by Mike Streeton
On Wed, 28 Jun 2006 17:11:51 +0100
"Mike Streeton" <[hidden email]> wrote:

> Does Network Explorer work with windows DFS  file systems, we are trying
> to access one, but keep getting unknown host, what was confusing us was
> the virtual dfs server is the same name as the domain. So it now appears
> to be accessing the right virtual machine, but not allowing access, any
> ideas?

We have seen problems with DFS in general. Traditionally DFS works by
checking a flag when connecting to a drive and then based on that query
the server for a referral. But there seems to be a mode of operation where
Windows clients obtain information about DFS through other communications
channels. It looks like smbclient deals with this problem by simply
performing the referral before even trying to connect to drives. Try
smbclient to verify that it's just a protocol error.

Mike

--
Michael B Allen
PHP Extension for SSO w/ Windows Group Authorization
http://www.ioplex.com/
Reply | Threaded
Open this post in threaded view
|

Re: DFS and NetworkExplorer

Thomas Bley
Hi,

Looking into the code, I made this change in SmbFile.java:

    String getDfsUncPath0() throws SmbException {
        getUncPath0();
        if( dfsReferral == null ) {
            return null;
        }
        unc = dfsReferral.nodepath + unc.substring(
dfsReferral.path.length() );
        return "".equals( unc ) ? "\\" : unc;
       
        // tb
        // not working when calling listFiles() a second time:
        // original jCIFS 1.2.9:
        // String dunc = dfsReferral.nodepath + unc.substring(
dfsReferral.path.length() );
        // return "".equals( dunc ) ? "\\" : dunc;
    }

Maybe the original is causing "unknown host" ?

bye,
Thomas


Michael B Allen wrote:

> On Wed, 28 Jun 2006 17:11:51 +0100
> "Mike Streeton" <[hidden email]> wrote:
>
>  
>> Does Network Explorer work with windows DFS  file systems, we are trying
>> to access one, but keep getting unknown host, what was confusing us was
>> the virtual dfs server is the same name as the domain. So it now appears
>> to be accessing the right virtual machine, but not allowing access, any
>> ideas?
>>    
>
> We have seen problems with DFS in general. Traditionally DFS works by
> checking a flag when connecting to a drive and then based on that query
> the server for a referral. But there seems to be a mode of operation where
> Windows clients obtain information about DFS through other communications
> channels. It looks like smbclient deals with this problem by simply
> performing the referral before even trying to connect to drives. Try
> smbclient to verify that it's just a protocol error.
>
> Mike
>
>  

Reply | Threaded
Open this post in threaded view
|

RE: DFS and NetworkExplorer

Mike Streeton
In reply to this post by Mike Streeton
I have finally got it working. We have two parts of the app that are
NetworkExplorer like. One is a directory browser and the redirect that
is generated was generating the wrong url (this is based on the jcifs
code) the fix was to construct the redirect url:

                } catch (DfsReferral dr) {
                        response.sendRedirect(request.getContextPath() +
request.getServletPath() + "/"
                                        + dr.server + "/" + dr.share +
"/");
                        response.flushBuffer();
                        return;
                }

We do not need any other path/query string information.

The other part of the app allows users to download files. This proved to
be more of a struggle, we did not get the dfs redirect if we went
straight to the file. The solution was to walk the path starting at the
server until we either got to the file (in which case we sent it back)
or got a dfs referral in which case we construct the redirect as above
but tagging on the rest of the path. This worked okay the first time you
did it, but if you tried again without restarting it hung and got into a
401; 401; 302 loop. The fix for this was to cache the dfs referral and
redirect straight away when we spot it. This is also slightly faster.
The only issue now is the speed to do the handshake that take between
30s-60s. The NTLM HTTP filter does it in about 2s. Thanks for all the
help

Mike

www.ardentia.com the home of NetSearch
-----Original Message-----
From: Michael B Allen [mailto:[hidden email]]
Sent: 28 June 2006 18:11
To: Mike Streeton
Cc: [hidden email]
Subject: Re: [jcifs] DFS and NetworkExplorer

On Wed, 28 Jun 2006 17:11:51 +0100
"Mike Streeton" <[hidden email]> wrote:

> Does Network Explorer work with windows DFS  file systems, we are
trying
> to access one, but keep getting unknown host, what was confusing us
was
> the virtual dfs server is the same name as the domain. So it now
appears
> to be accessing the right virtual machine, but not allowing access,
any
> ideas?

We have seen problems with DFS in general. Traditionally DFS works by
checking a flag when connecting to a drive and then based on that query
the server for a referral. But there seems to be a mode of operation
where
Windows clients obtain information about DFS through other
communications
channels. It looks like smbclient deals with this problem by simply
performing the referral before even trying to connect to drives. Try
smbclient to verify that it's just a protocol error.

Mike

--
Michael B Allen
PHP Extension for SSO w/ Windows Group Authorization
http://www.ioplex.com/
Reply | Threaded
Open this post in threaded view
|

Re: DFS and NetworkExplorer

Michael B Allen-4
On Fri, 30 Jun 2006 12:28:08 +0100
"Mike Streeton" <[hidden email]> wrote:

> I have finally got it working. We have two parts of the app that are
> NetworkExplorer like. One is a directory browser and the redirect that
> is generated was generating the wrong url (this is based on the jcifs
> code) the fix was to construct the redirect url:
>
> } catch (DfsReferral dr) {
> response.sendRedirect(request.getContextPath() +
> request.getServletPath() + "/"
> + dr.server + "/" + dr.share +
> "/");
> response.flushBuffer();
> return;
> }
>
> We do not need any other path/query string information.
>
> The other part of the app allows users to download files. This proved to
> be more of a struggle, we did not get the dfs redirect if we went
> straight to the file. The solution was to walk the path starting at the

Was the server Samba?

--
Michael B Allen
PHP Extension for SSO w/ Windows Group Authorization
http://www.ioplex.com/
Reply | Threaded
Open this post in threaded view
|

RE: DFS and NetworkExplorer

Mike Streeton
In reply to this post by Mike Streeton
No windows

www.ardentia.com the home of NetSearch
-----Original Message-----
From: Michael B Allen [mailto:[hidden email]]
Sent: 30 June 2006 23:11
To: Mike Streeton
Cc: [hidden email]
Subject: Re: [jcifs] DFS and NetworkExplorer

On Fri, 30 Jun 2006 12:28:08 +0100
"Mike Streeton" <[hidden email]> wrote:

> I have finally got it working. We have two parts of the app that are
> NetworkExplorer like. One is a directory browser and the redirect that
> is generated was generating the wrong url (this is based on the jcifs
> code) the fix was to construct the redirect url:
>
> } catch (DfsReferral dr) {
> response.sendRedirect(request.getContextPath() +
> request.getServletPath() + "/"
> + dr.server + "/" + dr.share +
> "/");
> response.flushBuffer();
> return;
> }
>
> We do not need any other path/query string information.
>
> The other part of the app allows users to download files. This proved
to
> be more of a struggle, we did not get the dfs redirect if we went
> straight to the file. The solution was to walk the path starting at
the

Was the server Samba?

--
Michael B Allen
PHP Extension for SSO w/ Windows Group Authorization
http://www.ioplex.com/