commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: VFS zip file on smb
Date Tue, 10 Jun 2008 13:17:42 GMT
On 10/06/2008, Yannick PIERSON <piersony@gmail.com> wrote:
> Hi,
>
>  I solve my problem. My zip file hadn't the same security that others. I give
>  the same security to it, and now it's working.
>  Sorry for my previous mails.
>

Caused by: jcifs.smb.SmbAuthException: Access is denied.

seems to be the common factor here.

However, I would have exected isReadable() to have required similar
access - is that a bug in the isReadable() method?

>  Thanks,
>
>
>  yannick
>
>
>  ---------- Forwarded message ----------
>  From: Yannick PIERSON <piersony@gmail.com>
>  Date: 2008/6/10
>  Subject: VFS zip file on smb
>  To: Commons Users List <user@commons.apache.org>
>
>
>  Hi,
>
>  I get a problem with zip file on a smb file system. The exists() and
>  isReadable() methods confirm that my file exists and is readable.
>
>  First I tried to get the inputStream of the file but it doesn't work.
>  My trace error:
>  INFO: Using "C:\DOCUME~1\pierson\LOCALS~1\Temp\vfs_cache" as temporary files
>  store.
>  1: new Socket: java.net.DatagramSocket@17431b9
>  2: new Socket: Socket[addr=/10.40.0.106,port=445,localport=2771]
>  3: new Socket: Socket[addr=/10.40.0.106,port=445,localport=2772]
>  Exception in thread "main" org.apache.commons.vfs.FileSystemException: Could
>  not read file "smb://host:port/share/test.zip".
>         at
>  org.apache.commons.vfs.provider.AbstractFileObject.getInputStream(AbstractFileObject.java:1163)
>         at
>  org.apache.commons.vfs.provider.DefaultFileContent.getInputStream(DefaultFileContent.java:354)
>         at test.TestUserApp.main(TestUserApp.java:35)
>  Caused by: jcifs.smb.SmbAuthException: Access is denied.
>         at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:530)
>         at jcifs.smb.SmbTransport.send(SmbTransport.java:642)
>         at jcifs.smb.SmbSession.send(SmbSession.java:239)
>         at jcifs.smb.SmbTree.send(SmbTree.java:109)
>         at jcifs.smb.SmbFile.send(SmbFile.java:718)
>         at jcifs.smb.SmbFile.open0(SmbFile.java:923)
>         at jcifs.smb.SmbFile.open(SmbFile.java:940)
>         at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:70)
>         at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:62)
>         at
>  org.apache.commons.vfs.provider.smb.SmbFileObject.doGetInputStream(SmbFileObject.java:205)
>         at
>  org.apache.commons.vfs.provider.AbstractFileObject.getInputStream(AbstractFileObject.java:1159)
>         ... 2 more
>
>
>
>  So I tried to replicate my file but I get this error:
>  INFO: Using "C:\DOCUME~1\pierson\LOCALS~1\Temp\vfs_cache" as temporary files
>  store.
>  1: new Socket: java.net.DatagramSocket@15c97e4
>  2: new Socket: Socket[addr=/10.40.0.106,port=445,localport=2721]
>  3: new Socket: Socket[addr=/10.40.0.106,port=445,localport=2722]
>  Exception in thread "main" org.apache.commons.vfs.FileSystemException: Could
>  not replicate "smb://host:port/share/test.zip".
>         at
>  org.apache.commons.vfs.provider.AbstractFileSystem.replicateFile(AbstractFileSystem.java:372)
>         at test.TestUserApp.main(TestUserApp.java:35)
>  Caused by: org.apache.commons.vfs.FileSystemException: Could not replicate
>  "smb://host:port/share/test.zip".
>         at
>  org.apache.commons.vfs.impl.PrivilegedFileReplicator.replicateFile(PrivilegedFileReplicator.java:123)
>         at
>  org.apache.commons.vfs.provider.AbstractFileSystem.doReplicateFile(AbstractFileSystem.java:410)
>         at
>  org.apache.commons.vfs.provider.AbstractFileSystem.replicateFile(AbstractFileSystem.java:368)
>         ... 1 more
>  Caused by: java.security.PrivilegedActionException:
>  org.apache.commons.vfs.FileSystemException: Could not copy
>  "smb://host:port/share/test.zip" to
>  "file:///C:/DOCUME~1/pierson/LOCALS~1/Temp/vfs_cache/tmp_37033_test.zip".
>         at java.security.AccessController.doPrivileged(Native Method)
>         at
>  org.apache.commons.vfs.impl.PrivilegedFileReplicator.replicateFile(PrivilegedFileReplicator.java:119)
>         ... 3 more
>  Caused by: org.apache.commons.vfs.FileSystemException: Could not copy
>  "smb://host:port/share/test.zip" to
>  "file:///C:/DOCUME~1/pierson/LOCALS~1/Temp/vfs_cache/tmp_37033_test.zip".
>         at
>  org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:933)
>         at
>  org.apache.commons.vfs.impl.DefaultFileReplicator.replicateFile(DefaultFileReplicator.java:232)
>         at
>  org.apache.commons.vfs.impl.PrivilegedFileReplicator$ReplicateAction.run(PrivilegedFileReplicator.java:164)
>         ... 5 more
>  Caused by: org.apache.commons.vfs.FileSystemException: Could not read file
>  "smb://host:port/share/test.zip".
>         at
>  org.apache.commons.vfs.provider.AbstractFileObject.getInputStream(AbstractFileObject.java:1163)
>         at
>  org.apache.commons.vfs.provider.DefaultFileContent.getInputStream(DefaultFileContent.java:354)
>         at org.apache.commons.vfs.FileUtil.writeContent(FileUtil.java:71)
>         at org.apache.commons.vfs.FileUtil.copyContent(FileUtil.java:103)
>         at
>  org.apache.commons.vfs.provider.AbstractFileObject.copyFrom(AbstractFileObject.java:924)
>         ... 7 more
>  Caused by: jcifs.smb.SmbAuthException: Access is denied.
>         at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:530)
>         at jcifs.smb.SmbTransport.send(SmbTransport.java:642)
>         at jcifs.smb.SmbSession.send(SmbSession.java:239)
>         at jcifs.smb.SmbTree.send(SmbTree.java:109)
>         at jcifs.smb.SmbFile.send(SmbFile.java:718)
>         at jcifs.smb.SmbFile.open0(SmbFile.java:923)
>         at jcifs.smb.SmbFile.open(SmbFile.java:940)
>         at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:70)
>         at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:62)
>         at
>  org.apache.commons.vfs.provider.smb.SmbFileObject.doGetInputStream(SmbFileObject.java:205)
>         at
>  org.apache.commons.vfs.provider.AbstractFileObject.getInputStream(AbstractFileObject.java:1159)
>         ... 11 more
>
>
>
>  So, how can I do to get my zip file and read it in order to extract it.
>
>  Thanks for your help,
>
>  Regards,
>
>  Yannick
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message