AlfrescoFileServer

Configurando un CIF Server y un FTP Server en Alfresco #

Copiamos los archivos necesarios en el directorio extension:

$ cd /usr/local/alfresco/tomcat
$ cp webapps/alfresco/WEB-INF/classes/alfresco/file-servers.properties \
 shared/classes/alfresco/extension/custom-file-servers.properties
$ cp webapps/alfresco/WEB-INF/classes/alfresco/file-servers.xml \
 shared/classes/alfresco/extension/file-servers-custom.properties
$ cp webapps/alfresco/WEB-INF/classes/alfresco/network-protocol-context.xml \ 
 shared/classes/alfresco/extension/network-protocol-context.xml

$ cd shared/classes/alfresco/extension/

Editamos el properties en primer lugar.

$ vim custom-file-servers.properties

cifs.localname=${localname}
cifs.domain=ZYLK
cifs.broadcast=192.168.1.255
Apuntamos al properties en el bean correspondiente:
$ vim network-protocol-context.xml

   <bean id="fileServersConfigSource" class="org.alfresco.config.source.UrlConfigSource">
      <constructor-arg>
         <list>
            <value>classpath:alfresco/file-servers.xml</value>
            <value>classpath:alfresco/extension/file-servers-custom.xml</value>
         </list>
      </constructor-arg>
   </bean>
   <bean id="fileServersConfigService" class="org.alfresco.config.xml.XMLConfigService" init-method="init">
      <constructor-arg>
         <ref bean="fileServersConfigSource" />
      </constructor-arg>
      <property name="properties">
         <list>
                <value>classpath:alfresco/file-servers.properties</value>
                <value>classpath:alfresco/extension/custom-file-servers.properties</value>
              </list>
      </property>
   </bean>

Configuramos los servidores de ficheros, CIFS (puertos 1445, 1137, 1138 y 1139) y FTP (1121) que posteriormente natearemos via iptables en el script de inicio. Modificamos las partes correspondientes al servidor CIFS, FTP y NFS.


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

   <config evaluator="string-compare" condition="CIFS Server">
          <serverEnable enabled="true"/>
      <host name="${cifs.localname}A" domain="${cifs.domain}"/>
      <comment>Alfresco CIFS Server</comment>

      <!-- Set to the broadcast mask for the subnet -->
      <broadcast>${cifs.broadcast}</broadcast>

      <!-- Use Java socket based NetBIOS over TCP/IP and native SMB on linux -->
      <tcpipSMB platforms="linux,solaris,macosx"/>
      <netBIOSSMB platforms="linux,solaris,macosx"/>

           <!-- Can be mapped to non-privileged ports, then use firewall rules to forward
                    requests from the standard ports -->
      <tcpipSMB port="1445" platforms="linux,solaris,macosx"/>
      <netBIOSSMB sessionPort="1139" namePort="1137" datagramPort="1138" platforms="linux,solaris,macosx"/>

      <hostAnnounce interval="5"/>

      <!-- Use Win32 NetBIOS interface on Windows -->
      <Win32NetBIOS/>
      <Win32Announce interval="5"/>

      <!-- CIFS authentication -->
      <authenticator type="enterprise">
      </authenticator>

<!--
      <WINS>
         <primary>1.2.3.4</primary>
         <secondary>5.6.7.8</secondary>
      </WINS>
-->
      <sessionDebug flags="Negotiate,Socket"/>
   </config>

   <config evaluator="string-compare" condition="FTP Server">
          <serverEnable enabled="true"/>

          <!-- Run on a non-privileged port -->
          <port>1121</port>

      <!-- FTP authentication -->
      <authenticator type="alfresco"/>

<!--      <debug flags="File,Search,Error,Directory,Info,DataPort"/> -->
   </config>

   <config evaluator="string-compare" condition="NFS Server">
          <serverEnable enabled="false"/>
   </config>

</alfresco-config>

Reiniciamos el servidor con el script de inicio. Debemos ver una traza del Tomcat del estilo a:

20:13:43,600  INFO  [config.xml.XMLConfigService$PropertyConfigurer] 
Loading properties file from class path resource [alfresco/extension/custom-file-servers.properties]

Podemos ver los puertos abiertos con nmap, o hacer pruebas simples con telnet a los puertos nateados.

21  --> 1121
445 --> 1145
137 --> 1137
138 --> 1138
139 --> 1139
Promedio (0 Votos)
Comentarios