From alfrescowiki

Revision as of 14:54, 13 April 2005 by Gavinc (Talk | contribs)

Jump to: navigation, search


The Common Internet File System (CIFS) also known as Server Message Block (SMB) is a network protocol whose most common use is sharing files on a LAN. The protocol allows a client to access servers, files and printers on the LAN as though they were on the local machine.

Microsoft uses CIFS in all flavours of Windows to provide it's networking capabilities i.e. Shares, Network Neighbourhood. Unix/Linux also use CIFS via Samba and Apple has several clients and servers available, thus it's a fairly interopable protocol.


CIFS has a client and a server part. The server is probably more applicable to us as we could expose the repository as a CIFS server. This would theoretically mean that the repository would show up in the Network Neighbourhood and users would be able to map the repository as a normal Windows drive letter.

The client capabilities may also be useful as we could import content from an existing network share, for example.


There is an open source implementation of a CIFS client called jCIFS.

The client library provides programmatic access to CIFS servers allowing the following:

  • Browsing
    • Domains and workgroups
    • Servers within a domain/workgroup
    • Shares available on a server i.e. folders, printers
    • Files and folders within a share
  • File/Folder Manipulation (with appropriate authentication)
    • Create files/folders
    • Read/Write files
    • Delete files/folders
    • Test for existence
    • Retrieve properties


In order to access network resources you obviously need to supply login credentials.

These are provided in the URL you use to access the resource, for example:


The credentials can also be provided via the "jcifs.smb.client.username" and "jcifs.smb.client.password" properties. In turn there are several ways these can be provided to the client i.e. from command line, properties file etc.

However, it doesn't appear that these can be transparently picked up from the local machine i.e. single sign-on. In order to do that we would need to run from within a browser. We could then make use of the NTLM authentication filter jCIFS provides to source the credentials via the browsers challenge/response mechanism (although this would probably be IE only).


As mentioned above it makes more sense for us to try and provide a CIFS server interface to the repository. This means the repository can become accessible via Windows Network Neighbourhood and as a shared network drive.

JLAN Server

JLAN Server is a commercial product that provides a Java based CIFS/SMB server. It fronts a virtual file system that can be mapped to a physical file system, a database or any other type of content repository. The easiest route for us to take would be to provide a JLAN virtual file system implementation of our repository API, however, as mentioned above it is a commercial product and not open source.

An attempt to decompile the downloadable demo was unsuccessful. It appears they have obfuscated the code supplied in the JAR files, so most of the classes and their contained methods are reduced to a, b, c, d etc. Furthermore, most those classes with meaningful names fail to decompile!

TODO: Notes on getting the server running and using the JavaFileDiskDriver virtual file system.


JLAN Server has 2 built-in authentication approaches, one is handled by JLAN itself and the other is a pass through authenticator allowing a domain controller to be used to authenticate clients.

Issues & Comments

  • Writing our own CIFS server is going to require intimate knowledge of the CIFS/SMB protocol and NETBIOS to integrate with Windows i.e. we'll need a network expert!
  • JLAN Server code is obfuscated so that doesn't help but the jCFIS client code may as it is open source
Personal tools
© 2015 Alfresco Software, Inc. All Rights Reserved. Legal | Privacy | Accessibility