cancel
Showing results for 
Search instead for 
Did you mean: 

Upload a folder

chrizz_msweb
Champ in-the-making
Champ in-the-making
Hi,

I'm suggesting my company to use Alfresco for document management. Currently we use shared folder.
I've create the demonstration, new we're about to import all the old data into Alfresco.
Can anyone explain me how to upload more than a file (whole folder) at a time to Alfreso's Space?

Thax
16 REPLIES 16

hydro
Champ in-the-making
Champ in-the-making
Ok I found the file-servers-custom.xml and it is as below.
I found it in the location
/var/lib/tomcat5/shared/classes/alfresco/extension
I have renamed it from file-servers-custom.xml.sample to file-servers-custom.xml.
What do I do next?


<alfresco-config area="file-servers">

   <!– To override the default Alfresco filesystem use replace="true", to –>
   <!– add additional filesystems remove the replace="true" attribute     –>
  
   <config evaluator="string-compare" condition="Filesystems" replace="true">
     <filesystems>
       
         <!– Alfresco repository access shared filesystem –>
         <filesystem name="${filesystem.name}">
            <store>workspace://SpacesStore</store>
            <rootPath>/app:company_home</rootPath>

         <!– Add a URL file to each folder that links back to the web client –>
            <urlFile>
               <filename>__Alfresco.url</filename>
               <webpath>http://${localname}:8080/alfresco/</webpath>
            </urlFile>

         <!– Mark locked files as offline –>
          <offlineFiles/>

         <!– Desktop actions –>
         <!– Uses a client-side application to trigger a server-side action                         –>
         <!–   Echo - displays a message echoed from the server                                     –>
         <!–   URL  - launches a URL via the Windows shell                                          –>
         <!–   CmdLine - launches the Notepad application                                           –>
         <!–   CheckInOut - checks files in/out, drag and drop files onto the application           –>
         <!–   JavaScript - run a server-side script                                                –>
         <!–   JavaScriptURL - server-side script that generates a URL to the folder using a ticket –>
         <!–                   to avoid having to logon                                             –>

            <desktopActions>
               <global>
                  <path>alfresco/desktop/Alfresco.exe</path>
                  <webpath>http://${localname}:8080/alfresco/</webpath>
               </global>
               <action>
                  <class>org.alfresco.filesys.repo.desk.CheckInOutDesktopAction</class>
                  <name>CheckInOut</name>
                  <filename>__CheckInOut.exe</filename>
               </action>
               <action>
                  <class>org.alfresco.filesys.repo.desk.JavaScriptDesktopAction</class>
                  <name>JavaScriptURL</name>
                  <filename>__ShowDetails.exe</filename>
                  <script>alfresco/desktop/showDetails.js</script>
                  <attributes>anyFiles</attributes>
                  <preprocess>copyToTarget</preprocess>
               </action>
            <action>
               <class>org.alfresco.filesys.repo.desk.EchoDesktopAction</class>
               <name>Echo</name>
                 <filename>__AlfrescoEcho.exe</filename>
            </action>
            <action>
               <class>org.alfresco.filesys.repo.desk.URLDesktopAction</class>
               <name>URL</name>
                 <filename>__AlfrescoURL.exe</filename>
            </action>
            <action>
               <class>org.alfresco.filesys.repo.desk.CmdLineDesktopAction</class>
               <name>CmdLine</name>
                 <filename>__AlfrescoCmd.exe</filename>
            </action>
            <action>
               <class>org.alfresco.filesys.repo.desk.JavaScriptDesktopAction</class>
               <name>JavaScript</name>
               <filename>__AlfrescoScript.exe</filename>
               <script>alfresco/desktop/dumpRequest.js</script>
               <attributes>anyFiles, multiplePaths , allowNoParams</attributes>
               <preprocess>confirm, copyToTarget</preprocess>
            </action>
            </desktopActions>

         <!– Additional access control of the filesystem –>
         <!– Access type of 'none' will stop the filesystem from showing up for that user/address/protocol –>          
            <!–
            <accessControl default="Write">
               <user name="admin" access="Write"/>
               <address subnet="192.168.1.0" mask="255.255.255.0" access="Write"/>
            </accessControl>
            –>
         </filesystem>
        
         <!– AVM virtualization view of all stores/versions for WCM –>
         <!– virtual view can be any of the following: normal, site, staging, author, preview –>
         <avmfilesystem name="AVM">
            <virtualView stores="site,staging,author"/>
         </avmfilesystem>
        
      </filesystems>
   </config>
</alfresco-config>

mdutoo
Champ on-the-rise
Champ on-the-rise
Hi hydro

You seem to be using Alfresco 3.2+. In this case, you SHOULD'NT use XML files - that's why you can't find custom-file-servers.xml - but merely add properties in alfresco-global.properties (which should be in tomcat/shared/classes for instance).

Further documentation about properties for configuring CIFS : http://wiki.alfresco.com/wiki/File_Server_Subsystem

Regards,
Marc

hydro
Champ in-the-making
Champ in-the-making
Hi,

There is a file-servers.properties in the location below that already has all the properties set.
/var/lib/tomcat5/webapps/alfresco/WEB-INF/classes/alfresco/subsystems/fileServers/default

Do I need to add these same properties to alfresco-global.properties?

The file-servers.properties file is as below

filesystem.name=Alfresco
filesystem.acl.global.defaultAccessLevel=Write

cifs.enabled=true
cifs.serverName=${localname}A
cifs.domain=DOMAIN
cifs.broadcast=10.255.255.255
# An empty value indicates bind to all available network adapters
cifs.bindto=10.10.6.78
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

# Optional WINS server primary and secondary IP addresses. Ignored if autoDetectEnabled=true
cifs.WINS.autoDetectEnabled=true
cifs.WINS.primary=1.2.3.4
cifs.WINS.secondary=5.6.7.8

ftp.enabled=true
ftp.port=21
ftp.ipv6.enabled=false

nfs.enabled=false

cifs.urlfile.prefix=http://${localname}:8080/alfresco/

hydro
Champ in-the-making
Champ in-the-making
Hi,

Please could sombody tell me

1) Whether ther is Alfresco 3.2r on Linux OS able to configure CIFS that works fine?
2) Post the configuration files up so that I can see how it is done file by file and step by step how to mount / route ip tables / configure samba / etc?

Please……..

mdutoo
Champ on-the-rise
Champ on-the-rise
Hi hydro

Does you logs (catalina.out , alfresco.log) say it's OK ?

It's a bad thing, but as a test, start Alfresco as a root so it'll be able to use the below 1024 ports it needs without port mapping. Afterwards don't forget to make rights right (!) again with a chown.

There is no need of Samba, actually using Alfresco as CIFS server prevents you from running Samba on a same server/IP.

Regards,
Marc

hydro
Champ in-the-making
Champ in-the-making
Issue with CIFS was solved.
Was able to see the Alfresco CIFS folder by executing the following commands in the putty.

iptables -I INPUT -p tcp –dport 445 -j ACCEPT
iptables -I INPUT -p tcp –dport 139 -j ACCEPT
iptables -I INPUT -p udp –dport 137 -j ACCEPT
iptables -I INPUT -p udp –dport 138 -j ACCEPT
iptables -I INPUT -p tcp –dport 1445 -j ACCEPT
iptables -I INPUT -p tcp –dport 1139 -j ACCEPT
iptables -I INPUT -p udp –dport 1137 -j ACCEPT
iptables -I INPUT -p udp –dport 1138 -j ACCEPT

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

Now I have to figure out why the tomcat logs show error when trying to load star office.

hydro
Champ in-the-making
Champ in-the-making
For my open office issue,

I just uncommented the first 2 lines in alfresco-global.properties as provided below the error msg in this post.

Open office error
UserSmiley Frustratedystem ERROR [util.exec.RuntimeExecBootstrapBean] Bootstrap command failed:
Execution result:
   os:         Linux
   command:    [soffice, -accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager, -env:UserInstallation=file:///var/lib/alfresco/alf_data/oouser, -nologo, -headless, -nofirststartwizard, -nocrashrep, -norestore]
   succeeded:  false
   exit code:  2
   out:
   err:        Cannot run program "soffice": java.io.IOException: error=2, No such file or directory

#
# External locations
#
ooo.exe=/usr/lib64/openoffice.org/program/soffice.bin
img.root=./ImageMagick
img.dyn=/usr/lib64
img.exe=/usr/bin/convert
swf.exe=/usr/local/bin/pdf2swf

For my CIFS issue,

I did IP table routing with smb service disabled as below. Just typed the commands below in linux command prompt:

iptables -I INPUT -p tcp –dport 445 -j ACCEPT
iptables -I INPUT -p tcp –dport 139 -j ACCEPT
iptables -I INPUT -p udp –dport 137 -j ACCEPT
iptables -I INPUT -p udp –dport 138 -j ACCEPT
iptables -I INPUT -p tcp –dport 1445 -j ACCEPT
iptables -I INPUT -p tcp –dport 1139 -j ACCEPT
iptables -I INPUT -p udp –dport 1137 -j ACCEPT
iptables -I INPUT -p udp –dport 1138 -j ACCEPT

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

and ensure inside alfresco-global.properties file you will need something like this


cifs.enabled=true
cifs.Server.Name=server
cifs.domain=DOMAIN
cifs.hostanounce=true

cifs.broadcast=0.0.0.0
cifs.tcpipSMB.port=1445
cifs.ipv6.enabled=false
cifs.netBIOSSMB.namePort=1137
cifs.netBIOSSMB.datagramPort=1138
cifs.netBIOSSMB.sessionPort=1139

Hope its useful for you