Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5E68D200498 for ; Tue, 29 Aug 2017 08:55:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5CAD1166247; Tue, 29 Aug 2017 06:55:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7BAF9166246 for ; Tue, 29 Aug 2017 08:55:06 +0200 (CEST) Received: (qmail 98059 invoked by uid 500); 29 Aug 2017 06:55:04 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 98047 invoked by uid 99); 29 Aug 2017 06:55:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Aug 2017 06:55:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 569DDCBA1D for ; Tue, 29 Aug 2017 06:55:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.502 X-Spam-Level: X-Spam-Status: No, score=-99.502 tagged_above=-999 required=6.31 tests=[KAM_NUMSUBJECT=0.5, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id O5L7goOq1QxQ for ; Tue, 29 Aug 2017 06:55:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 7770261131 for ; Tue, 29 Aug 2017 06:55:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 52D6BE0EB2 for ; Tue, 29 Aug 2017 06:55:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 4C0F42414F for ; Tue, 29 Aug 2017 06:55:00 +0000 (UTC) Date: Tue, 29 Aug 2017 06:55:00 +0000 (UTC) From: "Bernd Eckenfels (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (VFS-635) can't access SMBv2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 29 Aug 2017 06:55:07 -0000 [ https://issues.apache.org/jira/browse/VFS-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16144838#comment-16144838 ] Bernd Eckenfels commented on VFS-635: ------------------------------------- I prefer to have it in core with optional dependencies. Mostly because all other providers d(from commons) do the same. Otherwise the build will get even more complicated. (I do. understand that this results in a bad maven citizen, though) > can't access SMBv2 > ------------------ > > Key: VFS-635 > URL: https://issues.apache.org/jira/browse/VFS-635 > Project: Commons VFS > Issue Type: Wish > Affects Versions: 2.0, 2.1 > Reporter: Michael > > After Disabling SMBV1 in windows I can't access into the filesystem. > This code works when SMB1 is enabled, but sops to work once disabled. > {code} > @Test > public void testConnection() throws FileSystemException { > String login = "admin"; > String password = "password"; > String domain = ""; > String folder = "//10.0.0.0/smb"; > folder = folder.replaceAll("\\\\", "/"); > StringBuilder builder = new StringBuilder(128).append("smb").append(':').append(folder); > String fileURI = builder.toString(); > FileSystemOptions fsOptions = null; > StaticUserAuthenticator auth = new StaticUserAuthenticator(domain, login, password); > fsOptions = new FileSystemOptions(); > DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(fsOptions, auth); > FileSystemManager manager = VFS.getManager(); > FileSystemManager fileSystemManager = manager; > FileObject fileObject = fileSystemManager.resolveFile(fileURI, fsOptions); > boolean result = fileObject.isReadable(); > System.out.println(fileURI +" " + result); > } > {code} > this is how I disabled smb v1 > Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 0 -Force > How I enabled SMBV2 > Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB2 -Type DWORD -Value 1 -Force > https://support.microsoft.com/en-us/help/2696547/how-to-enable-and-disable-smbv1-smbv2-and-smbv3-in-windows-and-windows-server > [TRACE] > {code} > org.apache.commons.vfs2.FileSystemException: Could not determine if file "smb://10.0.0.0/smb/" is readable. > at org.apache.commons.vfs2.provider.AbstractFileObject.isReadable(AbstractFileObject.java:1761) > at com.pa.util.files.FileUtilsTest.testConnection(FileUtilsTest.java:109) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) > at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) > at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) > at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) > at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) > at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) > at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) > at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) > at org.junit.runners.ParentRunner.run(ParentRunner.java:363) > at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) > at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) > Caused by: org.apache.commons.vfs2.FileSystemException: Could not determine the type of file "smb://10.0.0.0/smb/". > at org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:1526) > at org.apache.commons.vfs2.provider.AbstractFileObject.exists(AbstractFileObject.java:1022) > at org.apache.commons.vfs2.provider.AbstractFileObject.isReadable(AbstractFileObject.java:1757) > ... 26 more > Caused by: jcifs.smb.SmbException: Failed to connect: 0.0.0.0<00>/10.0.0.0 > jcifs.util.transport.TransportException > java.net.SocketException: Connection reset > at java.net.SocketInputStream.read(SocketInputStream.java:210) > at java.net.SocketInputStream.read(SocketInputStream.java:141) > at jcifs.util.transport.Transport.readn(Transport.java:29) > at jcifs.smb.SmbTransport.peekKey(SmbTransport.java:388) > at jcifs.smb.SmbTransport.negotiate(SmbTransport.java:288) > at jcifs.smb.SmbTransport.doConnect(SmbTransport.java:319) > at jcifs.util.transport.Transport.run(Transport.java:241) > at java.lang.Thread.run(Thread.java:745) > at jcifs.util.transport.Transport.run(Transport.java:258) > at java.lang.Thread.run(Thread.java:745) > at jcifs.smb.SmbTransport.connect(SmbTransport.java:309) > at jcifs.smb.SmbTree.treeConnect(SmbTree.java:156) > at jcifs.smb.SmbFile.doConnect(SmbFile.java:911) > at jcifs.smb.SmbFile.connect(SmbFile.java:954) > at jcifs.smb.SmbFile.connect0(SmbFile.java:880) > at jcifs.smb.SmbFile.exists(SmbFile.java:1415) > at org.apache.commons.vfs2.provider.smb.SmbFileObject.doGetType(SmbFileObject.java:133) > at org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:1517) > ... 28 more > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)