cancel
Showing results for 
Search instead for 
Did you mean: 

Configuring Alfresco for CIFS Access [SOLVED]

vandamme
Champ in-the-making
Champ in-the-making
I'm trying to configure Alfresco to allow me to access its repository via CIFS, but am having some issues getting CIFS to work.  Following what I could find on the wiki, I tried enabling CIFS in my `Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/file-servers.properties' file, and restarted the server, but I still cannot access the CIFS repository (Windows Explorer can't map \\localhost\Alfresco – it gives me the error "The mapped network drive could not be created because the following error has occurred: The specified network name is no longer available." – and I'm not sure how to access CIFS shares from Linux, maybe something along the line of `mount \\\\localhost\\Alfresco /mnt/Alfresco -t cifs -o …').  My `file-servers.properties' file looks like this:

filesystem.name=Alfresco

cifs.enabled=true
cifs.localname=${localname}
cifs.domain=
cifs.broadcast=255.255.255.255
cifs.bindto=0.0.0.0
cifs.ipv6=disabled
cifs.hostannounce=true

ftp.enabled=true
ftp.ipv6=disabled

nfs.enabled=false

Is there anything else I need to do?  Could the problem be somehow related to firewall settings?  If anyone could point me in the direction of a step-by-step article on configuring CIFS access, that would be nice too.
8 REPLIES 8

gronfelt
Champ in-the-making
Champ in-the-making
As of Alfresco 3.2 those properties should be placed in alfresco-global.properties (in tomcat/shared/classes/). The filesystem.name property is not needed as far as I know.

Since you're trying to access localhost I don't think that the firewall should be an issue. However I do know that some Windows versions (Vista at least) can't resolve localhost out of the box, but I assume that you have been able to connect to the webinterface, did you use localhost then?

dward
Champ on-the-rise
Champ on-the-rise
If you are not running Alfresco as the root user, you will need to configure Alfresco to run using non-privileged ports. See

http://wiki.alfresco.com/wiki/File_Server_Subsystem#Running_SMB.2FCIFS_from_a_normal_user_account

And see all the other useful information on that page for configuring the CIFS server on v3.2.

It's not normal to have to change any of the other default settings in order to get it to work on Linux.

vandamme
Champ in-the-making
Champ in-the-making
@dward, I was running the 3.0 version of Alfresco Labs, but have just upgraded the war file to version 3.2, and will follow the guide you posted – thank you!

@gronfelt, the Windows version I'm running is indeed Vista, but I've been accessing the web client via http://localhost:8080/alfresco; could the problem still be related to the fact Vista cannot resolve localhost, since I've been accessing the web client through a browser, whereas I've been trying to map the CIFS repository directly through Windows Explorer?  If so, how difficult is it to configure Vista to resolve localhost?

I will also try modifying the alfresco-global.properties file and see how well that works.  Thank you both for your help!

gronfelt
Champ in-the-making
Champ in-the-making
I'm really no expert on Windows, but i would guess that if your browser knows how to find localhost that should be true for Windows Explorer to. However, just to be sure you could try using 127.0.0.1 instead of localhost. Configuring Vista to resolve localhost correctly is pretty simple, as described in this blogpost:

http://beaverly88.blogspot.com/2008/07/cannot-resolve-localhost-to-127001-in.html

Since you're running Alfresco in Windows you don't have to be concerned about privileged ports. However, you must make sure that there are no conflicts with Windows own file sharing, but since you cannot connect to localhost at all I would assume that's turned off.

vandamme
Champ in-the-making
Champ in-the-making
After playing around for a while with the Labs edition on my Linux installation, I've hammered out several issues, and am now getting this error:

17:59:46,454 User:System ERROR [org.alfresco.fileserver] Failed to get local domain/workgroup name, using default of WORKGROUP
17:59:46,455 User:System ERROR [org.alfresco.fileserver] (This may be due to firewall settings or incorrect <broadcast> setting)

What would my domain/workgroup name be?  Is it my hostname?

EDIT: I have Alfresco installed on both Linux and Windows for developmental/experimental purposes, but prefer Linux.

EDIT: For now, I'm assuming my domain name is the same as my hostname, and have configured the alfresco-global.properties file accordingly (I added the line cifs.domain={hostname}, where {hostname} is my hostname).  Restarting Alfresco and running nmap localhost gives me the following output:

PORT      STATE SERVICE                                        
21/tcp    open  ftp                                           
111/tcp   open  rpcbind                                       
139/tcp   open  netbios-ssn                                   
445/tcp   open  microsoft-ds                                  
3306/tcp  open  mysql                                         
8080/tcp  open  http-proxy                                    
8100/tcp  open  unknown
32784/tcp open  unknown
50500/tcp open  unknown

According to this Wikipedia article, CIFS listens on port 445, which NMAP lists as being listened to by microsoft-ds, is that the correct port and service?  From Windows [Vista], trying to map \\{hostname}A\Alfresco still gives me the 1st error I mentioned – am I getting closer to a solution?  I'm sorry for my questions, I'm getting a degree in Math and Computer Science, not Networking, so my knowledge regarding servers is limited (this is for an internship).

gronfelt
Champ in-the-making
Champ in-the-making
If your Alfresco server isn't going to be part of a Windows domain you could pretty much set the cifs.domain property to whatever you want or just ignore the error for now. You could still access it by IP adress or hostname, if the client knows how to resolve the host.

The nmap output looks ok, youre using ports 139 and 445, which is correct. These are privileged ports, with predefined service names, like "microsoft-ds" for port 445. If you want to make sure that it's actually Alfresco thats using the ports you could use netstat, like this:

netstat -npl |grep 445

which would output something like

tcp        0      0 :::445                      :::*                        LISTEN      3324/java

where the last column is process id, which should correspond to your Alfresco process.

So it looks like CIFS is up and running on your Linux server, now if your Windows box have network access to the Linux server you should be able to access it through CIFS with \\ip-adress or perhaps \\hostname if the Windows machine can resolve that hostname to the server ip (which it probably can't if you don't have a nameserver or have added the server ip and hostname to the hosts file on the Windows machine).

Of course there could be firewall problems, how are the computers connected? Do you have the Linux firewall or SELinux enabled on the server? If you're using a RedHat-flavour (RHEL, CentOS or Fedora) you could check and disable that with "system-config-securitylevel-tui".

A simple test to begin with could be to try to telnet to the server from the windows machine, on the CIFS-specific ports (139 and 445). Open a cmd-window and type

telnet <ip adress of server> <port number>

where port number is 139 or 445. If there are any firewall issues you will see an error that you can't connect, if not you should be able to connect (but you might just see a blank screen or some garbage, which is ok, simply close the cmd window in that case).

vandamme
Champ in-the-making
Champ in-the-making
CIFS works!!!

@gronfelt, thanks for all your help; accessing the network share via \\ip-address did the trick.  I'm marking this thread as [SOLVED].

chraja
Champ in-the-making
Champ in-the-making
This post helped me . Thanks for all the replies