[jcifs] Write acces failed

Kai Kuhn kku at shd.de
Wed Mar 24 12:20:43 GMT 2004


im trying to write files on a remote windows share from my linux box.
Here is a little test:

  SmbFile share = new SmbFile("smb://domain;User:pwd@server/share/");

          if (share.canRead())

             Permission per = share.getPermission();

             String[] files = share.list();

             for (int i = 0; i < files.length; i++)
                String file = files[i];
                System.out.println(i + " " + file);

             SmbFile[] allfiles = share.listFiles();

             for (int i = 0; i < allfiles.length; i++)
                SmbFile allfile = allfiles[i];
                System.out.println(i+" "+allfile);
System out is:

<all permissions>
<all actions>

but when i try to copy a file to the share the following trace is printed:

SmbFile updatefile = (SmbFile) packages.get(i);

jcifs.smb.SmbAuthException: Access denied
	at jcifs.smb.SmbTransport.send(SmbTransport.java:750)
	at jcifs.smb.SmbSession.send(SmbSession.java:109)
	at jcifs.smb.SmbTree.send(SmbTree.java:100)
	at jcifs.smb.SmbFile.send(SmbFile.java:619)
	at jcifs.smb.SmbFile.open0(SmbFile.java:709)
	at jcifs.smb.SmbFile.open(SmbFile.java:726)
	at jcifs.smb.SmbFile.copyTo0(SmbFile.java:1726)
	at jcifs.smb.SmbFile.copyTo(SmbFile.java:1830)

thanks 4 your help

kai kuhn

More information about the jcifs mailing list