04-29-2018 05:30 PM
Hi,
I'm trying to change the default directory for FTP service.
My installation is Alfresco Community 5.2.0
By default, when a user gets connected to Alfresco FTP, he lands in directory Alfresco, but i want a specific subfolder (i.e. /Alfresco/Sites/ftp-root/documentLibrary).
I've followed some tips suggested on the forum, but nothing changes. In alfresco documentation is specified that:
"Using the subsystem extension classpath mechanism, site specific customization of these default values can be placed in a Spring bean file. Create a file called custom-file-servers-context.xml and place it in a folder with the path <extension>\subsystems\fileServers\default\default\custom-file-servers-context.xml (note that the default\default part of the path is intentional)."
I've created custom-file-servers-context.xml with the following content:
<config evaluator="string-compare" condition="FTP Server">
<rootDirectory>/Alfresco/Sites/ftp-root/documentLibrary</rootDirectory>
</config>
both in directory
/opt/alfresco/tomcat/shared/classes/alfresco/extension/fileServers/default/default/
and
/opt/alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/subsystems/fileServers/default/default/
It doesn't work.
I'm not sure about the content of the file, because it is not documented anywhere what can be specified inside of it. I think that it must contain something like the content of
https://github.com/Alfresco/community-edition-old/blob/master/projects/repository/config/alfresco/su...
Any help isapreciated.
Thanks,
Antonio
04-30-2018 03:35 AM
The context XML file cannot contain the content you mentioned. It is a Spring file, not an Alfresco Config file (those with the config + evaluator + condition blocks).
It is more appropriate to configure the root path (for all protocols, not just FTP, because CIFS/SMB + FTP share the config) via a custom.properties file and including the "filesystem.rootPath" property, which should have an XPath to the root folder.
04-30-2018 03:35 AM
The context XML file cannot contain the content you mentioned. It is a Spring file, not an Alfresco Config file (those with the config + evaluator + condition blocks).
It is more appropriate to configure the root path (for all protocols, not just FTP, because CIFS/SMB + FTP share the config) via a custom.properties file and including the "filesystem.rootPath" property, which should have an XPath to the root folder.
04-30-2018 11:54 AM
Hi Axel,
thanks for the quick reply.
When you say "It is more appropriate to configure the root path via a custom.properties file and including the "filesystem.rootPath" property, which should have an XPath to the root folder." you mean that this properties file must be defined somewhere.
Where it should be defined? Do I still need to create the custom-file-servers-context.xml to define this custom properties?
Thanks,
Antonio.
04-30-2018 12:17 PM
"Where it should be defined?" => in a file, let's call it "custom.properties" within that subsystem (basically were you already put the context XML file).
The whole reason of the properties file is that you do not need the XML file for any configuration that can already be done by setting a simple property. So no, you will not need that file when you use the property.
04-30-2018 03:54 AM
For example, if your repository folder is /Inbox/FTP , in your alfresco-global.properties you should set something like:
protocols.rootPath=/app:company_home/cm:Inbox/cm:FTP
Regards.
--C.
04-30-2018 12:04 PM
Hi Cesar,
thanks to you too.
As asked to Axel, also in this case, this property must be defined in the spring file?
In my case, it is /Alfresco/Sites/ftp-root/documentLibrary
The property should be:
protocols.rootPath=/app:company_home//cm:Alfresco/cmites/cm:ftp-root/cm:documentLibrary
Am I right?
How the spring file should be defined?
Thanks for your help.
A.
05-01-2018 05:22 AM
As commented by Axel, you do not need the spring file (you can ignore it), and you just need to add the cited property in $TOMCAT/shared/classes/alfresco-global.properties (and restart Alfresco).
Other option is to include it in a properties file for the correspoding extended filesystem subsystem. If you prefer this way you missed subsystems folder under the path:
/opt/alfresco/tomcat/shared/classes/alfresco/extension/subsystems/fileServers/default/default/
Regards.
--C.
05-10-2018 08:40 AM
...isn't WebDav and CIFS using the same root then? Didn't try it out
05-10-2018 09:01 AM
For webdav you have this, instead:
system.webdav.rootPath=
Regards.
--C.
05-10-2018 01:39 PM
thanks Cesar 🙂
Explore our Alfresco products with the links below. Use labels to filter content by product module.