[jcifs] Problem setting attributes for directories

Thomas Bley bley at in.tum.de
Tue Jun 7 16:59:12 GMT 2005


I tried the following:

SmbFile f = new SmbFile( "smb://user:pw@host/share/test/" );
f.setAttributes( f.getAttributes() );

gives me:

Exception in thread "main" jcifs.smb.SmbException: Access is denied.
	at jcifs.smb.SmbTransport.send(SmbTransport.java:698)
	at jcifs.smb.SmbSession.send(SmbSession.java:259)
	at jcifs.smb.SmbTree.send(SmbTree.java:103)
	at jcifs.smb.SmbFile.send(SmbFile.java:738)
	at jcifs.smb.SmbFile.open0(SmbFile.java:876)
	at jcifs.smb.SmbFile.setPathInformation(SmbFile.java:2304)
	at jcifs.smb.SmbFile.setAttributes(SmbFile.java:2374)
	at SetAttrs.main(SetAttrs.java:8)

But this works:
SmbFile f = new SmbFile( "smb://user:pw@host/share/test/test.txt" );
f.setAttributes( f.getAttributes() );

maybe you can help me ? Is is possible to set attributes for folders ?


More information about the jcifs mailing list