[jira] [Commented] (VFS-635) can't access SMBv2
[ https://issues.apache.org/jira/browse/VFS-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16144831#comment-16144831 ] Christoph Obexer commented on VFS-635: -- [~codyswanson4] I see you added the new provider to the core vfs jar, from an application developers POV I would prefer to be able to explicitly request for example: org.apache.commons:commons-vfs2-smb and get org.apache.commons:commons-vfs2 and com.hierynomus:smbj as dependencies automatically. What do VFS developers think about that? > 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.int
[jira] [Commented] (VFS-398) FtpFileObject.getChildren() fails when a folder contains a file with a colon in the name
[ https://issues.apache.org/jira/browse/VFS-398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14021306#comment-14021306 ] Christoph Obexer commented on VFS-398: -- this also just bit me (and users of my app) is there any progress yet? I can even trigger if if the local filesystem contains a file with a colon in it's name - when listing the parent directory, which means that there is absolutely nothing I can do to avoid that. any ideas? Br, cobexer > FtpFileObject.getChildren() fails when a folder contains a file with a colon > in the name > > > Key: VFS-398 > URL: https://issues.apache.org/jira/browse/VFS-398 > Project: Commons VFS > Issue Type: Bug >Affects Versions: 2.0 > Environment: Connecting via FTP to a host running SunOS 5.10 >Reporter: Mark Leonard >Priority: Blocker > Fix For: 2.1 > > > In line 767 of DefaultFileSystemManager.java the UriParser's extractScheme() > method is called: > String scheme = UriParser.extractScheme(buffer.toString()); > This code was added in revision 780730 > http://svn.apache.org/viewvc?view=revision&revision=780730 > It is not clear to me why this change was made. > For the FTP provider, buffer contains a plain file name (i.e. without a path > and definitely not in URI form) > A colon is a valid character for a file name. > However a colon will be interpreted as a URI scheme name. > This causes an exception when the resolved path is checked using > AbstractFileName.checkName() > Sample code: > FileObject fo = > VFS.getManager().resolveFile("ftp://user:pass@host/some/path/some.file";); > fo.getParent().getChildren(); > If /some/path/ contains a child such as PREFIX:SUFFIX then an exception is > thrown: > Exception in thread "main" org.apache.commons.vfs2.FileSystemException: > Invalid descendent file name "PREFIX:SUFFIX". > at > org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveName(DefaultFileSystemManager.java:791) > at > org.apache.commons.vfs2.provider.AbstractFileObject.getChildren(AbstractFileObject.java:710) > at > org.apache.commons.vfs2.provider.ftp.FtpFileObject.getChildren(FtpFileObject.java:420) > Therefore calling code is unable to list the children of the specified folder. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (VFS-438) Please promote vfs-smb currently in the sandbox
[ https://issues.apache.org/jira/browse/VFS-438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16035980#comment-16035980 ] Christoph Obexer commented on VFS-438: -- There appears to be an Apache licensed implementation: https://github.com/hierynomus/smbj as noted on VFS-635 Please also note that SMBv1 as supported by jCIFS is considered bad by Microsoft: https://blogs.technet.microsoft.com/filecab/2016/09/16/stop-using-smb1/ Maybe it's best to drop the current jCIFS based implementation from the sandbox and instead provide a smbj based implementation as a separate maven artifact. > Please promote vfs-smb currently in the sandbox > --- > > Key: VFS-438 > URL: https://issues.apache.org/jira/browse/VFS-438 > Project: Commons VFS > Issue Type: New Feature >Affects Versions: 2.0 > Environment: windows/unix >Reporter: Dan Tran > > Current smb provider in the sandbox is mature enough to proceed with > promotion out of sandbox for general use. > Detail discussion is here > http://apache-commons.680414.n4.nabble.com/Promote-vfs-cift-out-of-sandbox-td4636519.html > The sandbox also tests hookup to current test suite, all we need is to > provide a external URI using VFS test suite instructions. > There are currently 2 classloader specific failures > Tests in error: > testLoadClass(org.apache.commons.vfs2.impl.test.VfsClassLoaderTests): > code.ClassToLoad > testSealing(org.apache.commons.vfs2.impl.test.VfsClassLoaderTests): > code.sealed.AnotherClass > Tests run: 1745, Failures: 0, Errors: 2, Skipped: 0 > require cifs 1.3.17 with one line change at > SmbFileObject.java line number 227 to > if (e.getNtStatus() == SmbException.NT_STATUS_NO_SUCH_FILE) -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (VFS-397) Add support for CIFS Directory content
[ https://issues.apache.org/jira/browse/VFS-397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16035984#comment-16035984 ] Christoph Obexer commented on VFS-397: -- There is smbj as noted in for example in https://issues.apache.org/jira/browse/VFS-438?focusedCommentId=16035980&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16035980 that would enable SMB2/3 support also > Add support for CIFS Directory content > -- > > Key: VFS-397 > URL: https://issues.apache.org/jira/browse/VFS-397 > Project: Commons VFS > Issue Type: New Feature >Reporter: Stounfree > Labels: cifs, commons-vfs, content, directory, listing > > Hello, > Could you please add support for listing CIFS Directory content. > Thanks in advance! -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (VFS-438) Please promote vfs-smb currently in the sandbox
[ https://issues.apache.org/jira/browse/VFS-438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16040346#comment-16040346 ] Christoph Obexer commented on VFS-438: -- According to http://www.apache.org/licenses/LICENSE-2.0#apply that is how you are supposed to use the Apache license?! > Please promote vfs-smb currently in the sandbox > --- > > Key: VFS-438 > URL: https://issues.apache.org/jira/browse/VFS-438 > Project: Commons VFS > Issue Type: New Feature >Affects Versions: 2.0 > Environment: windows/unix >Reporter: Dan Tran > > Current smb provider in the sandbox is mature enough to proceed with > promotion out of sandbox for general use. > Detail discussion is here > http://apache-commons.680414.n4.nabble.com/Promote-vfs-cift-out-of-sandbox-td4636519.html > The sandbox also tests hookup to current test suite, all we need is to > provide a external URI using VFS test suite instructions. > There are currently 2 classloader specific failures > Tests in error: > testLoadClass(org.apache.commons.vfs2.impl.test.VfsClassLoaderTests): > code.ClassToLoad > testSealing(org.apache.commons.vfs2.impl.test.VfsClassLoaderTests): > code.sealed.AnotherClass > Tests run: 1745, Failures: 0, Errors: 2, Skipped: 0 > require cifs 1.3.17 with one line change at > SmbFileObject.java line number 227 to > if (e.getNtStatus() == SmbException.NT_STATUS_NO_SUCH_FILE) -- This message was sent by Atlassian JIRA (v6.3.15#6346)