Home

CIFS Configuration on Ubuntu

You are here

12 posts / 0 new
Last post
CIFS Configuration on Ubuntu

Dear all,

I'm trying to configure CIFS on Ubuntu Linux 12.04 but it seems like it is not working. What might be the problem?

I have installed PostgreSQL as the database and enabled CIFS in alfresco-global.properties. When I try to access alfresco repository from windows by running \\[Alfresco server IP address] I get a message that the path cannot be found.

I'm using Alfresco 4.0.

My alfresco-global.properties file is as shown below:

dir.root=/home/*****/alfresco/alf_data
 
alfresco.context=alfresco
alfresco.host=127.0.0.1
alfresco.port=8080
alfresco.protocol=http
 
share.context=share
share.host=127.0.0.1
share.port=8080
share.protocol=http
 
### database connection properties ###
db.driver=org.postgresql.Driver
db.username=alfresco
db.password=**********
db.name=alfresco
db.url=jdbc:postgresql://localhost:5432/${db.name}
 
### FTP Server Configuration ###
ftp.enabled=true
ftp.port=2121
ftp.ipv6.enabled=false
 
### RMI service ports ###
alfresco.rmi.services.port=50500
avm.rmi.service.port=0
avmsync.rmi.service.port=0
attribute.rmi.service.port=0
authentication.rmi.service.port=0
repo.rmi.service.port=0
action.rmi.service.port=0
deployment.rmi.service.port=0
 
### External executable locations ###
ooo.exe=/home/*******/alfresco/openoffice/program/soffice.bin
ooo.enabled=true
ooo.port=8100
ooo.port=8100
img.root=/home/******/alfresco/common
img.dyn=${img.root}/lib
img.exe=${img.root}/bin/convert
swf.exe=/home/******/alfresco/common/bin/pdf2swf
jodconverter.enabled=false 
jodconverter.officeHome=/home/******/alfresco/openoffice 
jodconverter.portNumbers=8100 
 
### Initial admin password ###
alfresco_user_store.adminpassword=8aa95feb41041e230efcb7fc95b85585
 
### E-mail site invitation setting ###
notification.email.siteinvite=false
 
### File Protocol Root ###
protocols.rootPath=/${spaces.company_home.childname}/${spaces.sites.childname}
 
### License location ###
dir.license.external=/home/***********/alfresco
 
### Solr indexing ###
index.subsystem.name=solr
dir.keystore=${dir.root}/keystore
solr.port.ssl=8443
 
### BPM Engine ###
system.workflow.engine.jbpm.enabled=false
 
### CIFS Server Configuration - just added this on 6th August 2012 ###
cifs.enabled=true
cifs.serverName=****.***.****.***
cifs.domain=***************.***.***
cifs.broadcast=255.255.255.0
# An empty value indicates bind to all available network adapters
cifs.bindto=
cifs.ipv6.enabled=false
cifs.hostannounce=true
# Enable the use of asynchronous sockets/NIO code
cifs.disableNIO=false
# Disable the use of JNI code. Only currently affects Windows
cifs.disableNativeCode=false
# Session timeout, in seconds. Defaults to 15 minutes, to match the default Windows client setting.
# If no I/O is received within that time the session is closed by the server
cifs.sessionTimeout=900
 
# Can be mapped to non-privileged ports, then use firewall rules to forward requests from the standard ports
cifs.tcpipSMB.port=445
cifs.netBIOSSMB.sessionPort=139
cifs.netBIOSSMB.namePort=137
cifs.netBIOSSMB.datagramPort=138 

The catalina.out:

2012-08-07 05:17:46,633  INFO  [module.vti.VtiServer] [main] Vti server started successfully on port: 7070
 2012-08-07 05:17:46,634  INFO  [module.vti.VtiServer] [main] Vti server SessionIdManagerWorkerName: jetty1
 2012-08-07 05:17:54,838  WARN  [extensions.webscripts.DeclarativeRegistry] [main] Unable to register script classpath:webscripts/org/springframework/extensions/cmis/content.get.desc.xml due to error: 07070000 Web Script document org/springframework/extensions/cmis/content.get.desc.xml is attempting to define the url '/cmis/content:GET' already defined by org/alfresco/cmis/client/content.get.desc.xml
 2012-08-07 05:17:54,838  INFO  [extensions.webscripts.DeclarativeRegistry] [main] Registered 464 Web Scripts (+1 failed), 731 URLs
 2012-08-07 05:17:54,838  INFO  [extensions.webscripts.DeclarativeRegistry] [main] Registered 2 Package Description Documents (+0 failed) 
 2012-08-07 05:17:54,838  INFO  [extensions.webscripts.DeclarativeRegistry] [main] Registered 1 Schema Description Documents (+0 failed) 
 2012-08-07 05:17:54,840  INFO  [extensions.webscripts.AbstractRuntimeContainer] [main] Initialised Repository Web Script Container (in 8157.4824ms)
 2012-08-07 05:17:54,852  INFO  [extensions.webscripts.TemplateProcessorRegistry] [main] Registered template processor freemarker for extension ftl
 2012-08-07 05:17:54,853  INFO  [extensions.webscripts.ScriptProcessorRegistry] [main] Registered script processor javascript for extension js
 Aug 7, 2012 5:17:59 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
Aug 7, 2012 5:18:00 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive share.war
2012-08-07 05:18:00,595  INFO  [alfresco.util.OpenOfficeConnectionTester] [DefaultScheduler_Worker-3] The OpenOffice connection was re-established.
 2012-08-07 05:18:06,993  INFO  [extensions.webscripts.TemplateProcessorRegistry] [main] Registered template processor freemarker for extension ftl
 2012-08-07 05:18:07,167  INFO  [extensions.webscripts.ScriptProcessorRegistry] [main] Registered script processor javascript for extension js
 2012-08-07 05:18:07,168  INFO  [extensions.webscripts.TemplateProcessorRegistry] [main] Registered template processor freemarker for extension ftl
 2012-08-07 05:18:07,172  INFO  [extensions.webscripts.ScriptProcessorRegistry] [main] Registered script processor javascript for extension js
 2012-08-07 05:18:09,733  INFO  [extensions.webscripts.DeclarativeRegistry] [main] Registered 312 Web Scripts (+0 failed), 322 URLs
 2012-08-07 05:18:09,734  INFO  [extensions.webscripts.DeclarativeRegistry] [main] Registered 8 Package Description Documents (+0 failed) 
 2012-08-07 05:18:09,734  INFO  [extensions.webscripts.DeclarativeRegistry] [main] Registered 0 Schema Description Documents (+0 failed) 
 2012-08-07 05:18:09,935  INFO  [extensions.webscripts.AbstractRuntimeContainer] [main] Initialised Spring Surf Container Web Script Container (in 2756.6853ms)
 2012-08-07 05:18:09,940  INFO  [extensions.webscripts.TemplateProcessorRegistry] [main] Registered template processor freemarker for extension ftl
 2012-08-07 05:18:09,944  INFO  [extensions.webscripts.ScriptProcessorRegistry] [main] Registered script processor javascript for extension js
 Aug 7, 2012 5:18:10 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Aug 7, 2012 5:18:10 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Aug 7, 2012 5:18:10 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Aug 7, 2012 5:18:10 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/34  config=null
Aug 7, 2012 5:18:10 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8443
Aug 7, 2012 5:18:10 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 91940 ms
2012-08-07 05:18:40,473  INFO  [web.site.EditionInterceptor] [http-8080-4] Successfully retrieved license information from Alfresco.
 2012-08-07 05:21:19,670  INFO  [web.scripts.DictionaryQuery] [http-8080-16] Successfully retrieved dictionary information from Alfresco.

Re: CIFS Configuration on Ubuntu

Dear all,

I opened port 139 and 445 and now I can reach my Alfresco server but when I type \\[AlfrescoServerIPAddress] I get a blank window - it connects but does not list any folder. When I type \\[AlfrescoServerIPAddress]\alfresco I get a message that the path cannot be found. I'm trying to connect from Windows and the Alfresco server is running on a Ubuntu Linux.

Do I need to change the cifs.urlfile.prefix=http://${localname}/alfresco/ to something like: cifs.urlfile.prefix=\\${localname}\alfresco\ in alfresco properties file?

Your guidance will be appreciated.

BTW, I can access the folders when I type: http://AlfrescoServerIP:8080/alfresco/webdav on a browser.

The error message on alfresco.log file is:

11:05:53,231 ERROR [org.alfresco.fileserver] [SMB] Server error : org.alfresco.jlan.server.config.InvalidConfigurationException: Error initializing TCP-IP SMB session handler, Permission denied
11:05:53,261 INFO [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Starting 'imap' subsystem, ID: [imap, default]
11:05:53,277 ERROR [org.alfresco.fileserver] Error from JLAN
org.alfresco.jlan.server.config.InvalidConfigurationException: Error initializing TCP-IP SMB session handler, Permission denied
at org.alfresco.jlan.smb.server.nio.NIOCifsConnectionsHandler.initializeHandler(NIOCifsConnectionsHandler.java:259)
at org.alfresco.jlan.smb.server.SMBServer.run(SMBServer.java:475)
at java.lang.Thread.run(Thread.java:662)

Any ideas on this issue?

Regards,
Davis Onsakia

Re: CIFS Configuration on Ubuntu

you need to redirect the port settings

modprobe iptable_nat
iptables -F
iptables -t nat -F
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -t nat -A PREROUTING -p tcp --dport 445 -j DNAT --to-destination :1445
iptables -t nat -A PREROUTING -p tcp --dport 445 -j DNAT --to-destination :1445
iptables -t nat -A PREROUTING -p tcp --dport 137:139 -j DNAT --to-destination :1137-1139
iptables -t nat -A PREROUTING -p udp --dport 137:139 -j DNAT --to-destination :1137-1139

From
http://wiki.alfresco.com/wiki/File_Server_Configuration

Thanks
Joseph John

Re: CIFS Configuration on Ubuntu

Dear bisana,

The suggested commands have completely messed up my Alfresco installation! How can I go back to the way things were, basically undo the effects of those commands? I cannot now even access the login page despite Alfresco having started successfully.

Regards,
Davis

Re: CIFS Configuration on Ubuntu

sudo iptables -F

Thanks
Joseph John

Re: CIFS Configuration on Ubuntu

Have just run that command and it seems it is working okay save for the fact that I cannot now access Alfresco over the network - I cannot access Alfresco Share or Explorer using the server name or IP address on a broswser from another computer. I can access Share or Explorer on the Alfresco server alone. What can I do to access Alfresco on another computer?

Thanks in advance.

Re: CIFS Configuration on Ubuntu

I have managed to sort out the issue of Alfresco not being accessible from another computer.

Now to my initial problem: how can I access the Alfresco repository from a Windows computer? \\AlfrescoServerIP just displays a blank page and \\AlfrescoServerIP\alfresco indicates that the path is not found. Any ideas to solve this problem are most welcome.

Re: CIFS Configuration on Ubuntu

I presume you have sorted out binding the alfresco and share host to the loopback address.

Your setting for cifs.serverName does not look correct.
cifs.serverName=****.***.****.***
It should be a name for NetBios not an IP address. By default it would be {Servername}A

Are you using port forwarding or not?

If you are using your settings below then you will need to run alfresco as root.
cifs.tcpipSMB.port=445
cifs.netBIOSSMB.sessionPort=139
cifs.netBIOSSMB.namePort=137
cifs.netBIOSSMB.datagramPort=138

Senior Software Engineer
Alfresco

Re: CIFS Configuration on Ubuntu

Dear Mrogers,

Thanks for your guidance.

I've changed the cifs.serverName settings and restarted Alfresco (and the server itself) but still I cannot access the alfresco folder over the network.

I'm logged in as root and hence starting alfresco as root. I'm not using port forwarding (it messed my application when I tried it).

One thing I want to know: since I can access the Alfresco folder over the network using Samba, which specific folder can I map so that scanned documents can directly be delivered to a specific folder in the document library of a specific site in Alfresco?

Your guidance is always appreciated.

Regards,
Davis Onsakia

Re: CIFS Configuration on Ubuntu

Hi Davis
Did you said you are going to configure SAMBA instance to share Alfresco folder, I dont think it is a good idea
If you check the IPTABLES command , it shows that SAMBA ports are redirected.
Thanks

Thanks
Joseph John

Re: CIFS Configuration on Ubuntu

I used 4.0.e and just install without modify alfresco-global.properties.

it work.

Re: CIFS Configuration on Ubuntu

Dear Uthen,

Did CIFS work without changing anything on alfresco-global.properties file?

Please share.

Regards,
Davis