Home

how to enable cifs in alfresco community version?

You are here

23 posts / 0 new
Last post
how to enable cifs in alfresco community version?

can anybody help in enabling cifs on alfresco community version.
or tell how to check whether cifs is enabled or not??

thankx in advance

Re: how to enable cifs in alfresco community version?

Hello -

There is quite a bit of info in the wiki, you should start here http://wiki.alfresco.com/wiki/CIFS and here is a list of other wiki pages https://newpartners.alfresco.com/share.

Nancy

----------------------------------
Alfresco Community Manager
Download Alfresco, http://wiki.alfresco.com/wiki/Download_Community_Edition
Follow me on Twitter, http://twitter.com/nancygarrity
Join the Alfresco Facebook Group, http://www.facebook.com/group.php?gid=6063383762

** If this post was helpful, please click YES on the Post Rating --> **

Re: how to enable cifs in alfresco community version?

thanks nancy for reply.
i go through these links but cifs is still not properly enabled.

Re: how to enable cifs in alfresco community version?

That wiki page doesn't really help, I can't find any step by step guides to configuring CIFS on the latest build of the community edition, one document I found related to version 1.4 and 2.0 but things seem to have changed significantly since then, is the config done in the global.properties file as with the authentication or is it done elsewhere.

I am running Alfresco 3.3 CE on Centos 5.5

Re: how to enable cifs in alfresco community version?

Hi All,
Same problem.

I've followed:

http://wiki.alfresco.com/wiki/CIFS -> Setting up an Alfresco CIFS share on Windows

but still don't have it working. The registry change doesn't seem to disable SMB.

I'm running 3.3 CE on Win 2008.

Kind Regards,
Matt

Re: how to enable cifs in alfresco community version?

Help!

Re: how to enable cifs in alfresco community version?

CIFS = SMB

:D

Re: how to enable cifs in alfresco community version?

can anybody help???
is there not a single person who have enabled CIFS successfully??
if smbody enabled it plz help others too.....

thanks in advance

Re: how to enable cifs in alfresco community version?

With its out-of-the-box settings the CIFS server should start up. You don't need to do anything special to configure it.

The problem is getting it to co-exist with the CIFS server built into your Operating System. This is a particular challenge on Vista, Windows 2008 and Windows 7.

On Windows, so that it doesn't interfere with the CIFS server built into Windows, the Alfresco CIFS server pretends to be another host with the same name as the host running Alfresco, but with the letter 'a' at the end. So if Alfresco is running on host.domain.com, the CIFS server will be at \\hosta

Now it relies on intercepting NetBIOS calls in order to be able to do this. The problem is that new versions of Windows now prefer SMB over TCP to SMB over NetBIOS. This means that it will try to resolve hosta using a DNS lookup. If you ping hosta you'll find it has the same IP address as the actual host. This means that when trying to resolve \\hosta, Windows 2008 ends up going to the real CIFS port on the host machine.

The answer is to disable SMB over TCP/IP so that it falls back to SMB over NetBIOS.

In order to get local traffic to do this, you can add a line to C:\Windows\System32\drivers\etc\hosts so that hosta resolves via DNS lookup to a fake IP address. e.g.

192.168.192.192 hosta

In order to get other clients to do this, you may have to configure the Alfresco server as their DNS server, or use the firewall settings on the Alfresco server to block traffic on the SMB over TCP port 445.

All these problems exist because the Alfresco server is trying to co-exist with the CIFS server built into Windows. If you run Alfresco on a Linux host that doesn't have its own CIFS server, you of course won't have these problems.

Re: how to enable cifs in alfresco community version?

@shikka,

did you solved your problem?
I've had a lot trouble to bring CIFS to run.
It seemed to be a conflict with the ports, wich are used from the standard Samba utility of the OS.
To disable Samba did not solve the problem - I don't know why.
The solution is to reassign the ports of the Alfresco-CIFS-server.
While I'm updating from 3.2 to 3.3 (this weekend) I have to manage this feature again.
If you want I take you part of this experience.

Which OS's are you using (Client and server)?
I am operating from Linux to Linux.

Re: how to enable cifs in alfresco community version?

hi drik
thanks for ur help. i m using window xp

Re: how to enable cifs in alfresco community version?

Well that's easy then :) No messing around needed.

Senior Software Engineer
Alfresco

Re: how to enable cifs in alfresco community version?

I had trouble getting CIFS/SMB to work on Ubuntu. I fixed it with this:

I added

### CIFS/SMB Server Configuration ###
cifs.enabled=true
cifs.serverName="Alfresco"
cifs.hostannounce=true

to /opt/alfresco-3.4.c/tomcat/shared/classes/alfresco-global.properties

and removed samba:
sudo apt-get remove samba

Then restarted Alfresco and navigated to smb://:@hostname
works on Mac and Linux clients.

Re: how to enable cifs in alfresco community version?

I have the same problem, but on Windows 7 Ultimate x64

I've added this to C:\Alfresco\tomcat\shared\classes\alfresco-global.properties:
### CIFS/SMB Server Configuration ###
cifs.enabled=true
cifs.serverName="Alfresco"
cifs.hostannounce=true

restarted alfresco, but my windows doesn't find the smb server.

EDIT: Is http://localhost:8080/alfresco the address?

Re: how to enable cifs in alfresco community version?

Can anyone help me?

Re: how to enable cifs in alfresco community version?

Your URL is wrong. The protocol for SMB is not http and the port is not 8080.

I suggest you study Dave's reply above.

Senior Software Engineer
Alfresco

Re: how to enable cifs in alfresco community version?

Where's Dave post?
\\localhost\alfresco doesn't work too

edit: my mistake, sorry

Re: how to enable cifs in alfresco community version?

Thanks for the great information! I'm successfully able to connect to my CIFS server.

I'm running a simple installation of Community on a Windows 7 desktop which is on a domain.

The trouble I'm having now is figuring out what the username would be to authenticate from another computer since my installation of Alfresco is NOT tied into our active directory. Ultimately, should we go with Enterprise it no doubt will be, but that's a massive undertaking here at my agency.

Can anyone shed light on this? What should I enter as the DOMAIN in order to access the share-drive portion?

Forgive my idiocy, and thanks,

Ian :)

Re: how to enable cifs in alfresco community version?

Ok i struggled a lot with CIFS when i first started working with alfresco. Here is what i have learned.

You will need to edit your alfresco-global.properties file. This file is where you will want to change all of your configurations. Here is the location based on tomcat
/tomcat/shared/classes/alfresco-global.properties

For CIFS this is all you need to add.

alfresco.authentication.authenticateCIFS=true
cifs.enabled=true
cifs.serverName=${localname}

So add these lines, save the file and restart the alfresco. /opt/alfresco/alfresco.sh restart
The ${localname} is the name of your machine. An example would be that you name your server alfresco. It is recommended that you put this as your value

cifs.serverName=${localname}A

If your server name was named alfresco then to access the CIFS server you would need to create an alias called alfrescoA. The reason why they do this is to separate the CIFS server access from the web browser.

This is all the configurations you need to do for alfresco. If it is not working make sure you can even talk to alfresco, basically you don't have a firewall blocking you and the port. This can be a problem because on linux alfresco wants to bind to privileged ports. I personally don't want alfresco to run as a root, so i changed the ports.

Add these lines to alfresco-global.properties

cifs.tcpipSMB.port=1445
cifs.netBIOSSMB.sessionPort=1139
cifs.netBIOSSMB.namePort=1137
cifs.netBIOSSMB.datagramPort=1138

and add these lines to your iptables files

iptables -t nat -A PREROUTING -p tcp --dport 137 -j REDIRECT --to-port 1137
iptables -t nat -A PREROUTING -p tcp --dport 138 -j REDIRECT --to-port 1138
iptables -t nat -A PREROUTING -p tcp --dport 139 -j REDIRECT --to-port 1139
iptables -t nat -A PREROUTING -p tcp --dport 445 -j REDIRECT --to-port 1445

You should now be able to talk to Alfresco.

To test connectivity ping the ip address of the server. If you put ${localname}A then ping A (example alfrescoA), if not ping your (example alfresco)
If you can't resolve the host ping the ip address. If you can't ping your ip address that holds alfresco then you have a problem beyond setting up CIFS.

If you are able to ping your ip address but not your alias, set up the alias and work on that until it pings alfresco

Next it is time to set up CIFS on your local machine.

Go to my computer and right click it. Click map network drive.

For the folder name enter this
\\alfrescoA\alfresco\(filepath)
or
\\alfresco\alfresco\(filepath)

It will prompt you for your credentials so enter in a valid alfresco user name and password.

Does this help?

Re: how to enable cifs in alfresco community version?

Did you ever get CIFS working on XP? I'm running into the same problem.

Re: how to enable cifs in alfresco community version?

Do you mean installing alfresco on XP or using XP as your client?

Re: how to enable cifs in alfresco community version?

Hi,

I am trying to configure CIFS in MAC alfresco and testing connection using smb://localhost/alfresco and it cannot connect at all.

Can someone help me please?

Thanks.

Raja

Re: how to enable cifs in alfresco community version?

I have been able to configure CIFS in centos6 and use smbclient to create nodes (Alfresco 3.4.d). To those who may be interested
here is what configuration on my machine looks like:

/etc/hosts file
---------------------

127.0.0.1	localhost.localdomain	localhost
::1	                localhost6.localdomain6	localhost6
127.0.0.1	        aurc.dgde.in	aurc
192.168.1.233	aurc.dgde.in	aurc

alfresco-global.properties file configuration is as:
------------------------------------------------------------------------

# Configure the CIFS server to use non-privileged ports
# CIFS ports being changed to above 1024
# Binding with ports below 1024,requires that Alfresco be run as root
cifs.enabled=true
cifs.serverName=localhost
cifs.tcpipSMB.port=1445
cifs.netBIOSSMB.namePort=1137
cifs.netBIOSSMB.datagramPort=1138
cifs.netBIOSSMB.sessionPort=1139

Firewall (/etc/sysconfig/iptables) configuration is as:
-----------------------------------------------------------------------------

# Generated by iptables-save v1.4.7 on Sat Nov  5 13:47:16 2011
*nat
:PREROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
# Redirect from port 445 to port 1445
-A PREROUTING -p tcp -m tcp --dport 445 -j REDIRECT --to-ports 1445
# Redirect from port 137 to port 1137
-A PREROUTING -p tcp -m tcp --dport 137 -j REDIRECT --to-ports 1137
# Redirect from port 138 to port 1138
-A PREROUTING -p tcp -m tcp --dport 138 -j REDIRECT --to-ports 1138
# Redirect from port 139 to port 1139
-A PREROUTING -p tcp -m tcp --dport 139 -j REDIRECT --to-ports 1139
COMMIT
# Completed on Sat Nov  5 13:47:16 2011
# Generated by iptables-save v1.4.7 on Sat Nov  5 13:47:16 2011
*mangle
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
COMMIT
# Completed on Sat Nov  5 13:47:16 2011
# Generated by iptables-save v1.4.7 on Sat Nov  5 13:47:16 2011
*filter
:FORWARD ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
# Accept Established/Related connections
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# Accept ICMP packets
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
# Accept packets to apache web server
-A INPUT -p tcp -m tcp -m state --dport 80 --state NEW -j ACCEPT
# Accept packets to tomcat web server
-A INPUT -p tcp -m tcp -m state --dport 8080 --state NEW -j ACCEPT
# Accept packets to tomcat web server
-A INPUT -p udp -m udp -m state --dport 8080 --state NEW -j ACCEPT
# Accept packets to SSH server
-A INPUT -p tcp -m tcp -m state --dport 22 --state NEW -j ACCEPT
# Accept packets to  SMTP server https
-A INPUT -p tcp -m tcp -m state --dport 25 --state NEW -j ACCEPT
# Accept packets to  Web server https
-A INPUT -p tcp -m tcp -m state --dport 443 --state NEW -j ACCEPT
# Accept CIFS packets
-A INPUT -p tcp -m tcp -m state --dport 1445 --state NEW -j ACCEPT
-A INPUT -p tcp -m tcp -m state --dport 1139 --state NEW -j ACCEPT
-A INPUT -p udp -m udp -m state --dport 1137 --state NEW -j ACCEPT
-A INPUT -p udp -m udp -m state --dport 1138 --state NEW -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Sat Nov  5 13:47:16 2011

Using smbclient to create folders, copy, upload, delete files/folders in Alfresco from shell
----------------------------------------------------------------------------------------------------------------------------------

If CIFS has been properly configured on Alfresco, log into CIFS from localhost as:

$ smbclient -Uadmin -p 1139 //127.0.0.1/alfresco

'admin' is Alfresco administrator; 1139 tcp/ip port. 'alfresco' is filesystem name and is the default.
Password of admin will be asked for and then you will be taken to smb shell.
Type 'help' to learn about other smb commands. Or 'help mkdir' to learn about a specific smb
command such as mkdir or lcd.

Both admin and his password can be combined on a single line separated by % as:

$ smbclient -Uadmin%adminpasswd -p 1139 //127.0.0.1/alfresco

Or, you can tell in which directory (-D), smb should open:

$ smbclient -Uadmin%adminpasswd -p 1139 -D Sites/myoffice   //127.0.0.1/alfresco

Or. you can tell smbclient to do some work (-c) in alfresco folder (-D):

$ smbclient -Uadmin%adminpasswd -p 1139 -D Sites/myoffice   -c  "mkdir myfolder"   //127.0.0.1/alfresco

Or, you can tell smbclient to copy a file from current folder in linux to an alfresco filesystem folder (-D)

$ smbclient -Uadmin%adminpasswd -p 1139 -D Sites/myoffice/myfolder   -c  "put myfile.txt"   //127.0.0.1/alfresco

Or, cd to a local linux directory /home/Alfresco (lcd) and copy file myfile.txt from local linux directory to an alfresco filesystem folder (-D)

$ smbclient -Uadmin%adminpasswd -p 1139 -D Sites/myoffice/myfolder   -c  "lcd /home/Alfresco ; put myfile.txt"   //127.0.0.1/alfresco

Or, if your /etc/hosts file is properly configured, you can use localhost name (aurc) as:

$ smbclient -Uadmin -p 1139 //aurc/alfresco

forums index