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.
05-02-2018 05:21 AM
Hi guys,
thanks to all. I got it working with the following configuration:
file: /opt/alfresco/tomcat/shared/classes/alfresco/extension/subsystems/fileServers/default/default/custom.properties
content of the file: protocols.rootPath=/app:company_home/st:sites/cm:ftp-root/cm:documentLibrary
I've only one last question: in this way, the default root is still visible as "Alfresco"
So, basically, I've the user projected under the documentLibrary of the site ftp-root, but the user see this folder named as Alfresco.
Is possible to remove Alfresco at all? I tried with
protocols.rootPath=/st:sites/cm:ftp-root/cm:documentLibrary
but it doesn't work.
Any tips?
Thanks,
Antonio.
05-02-2018 10:16 AM
The name of the root is defined by the filesystem.name property. Add that with a different value to your custom properties file and you should be fine..
05-02-2018 11:50 AM
Great!
It works as expected!
Thankyou very much for your help and patience.
A.
07-13-2018 04:31 AM
Can you pls write the property which is working in your case?
07-18-2018 05:43 PM
Hi Kintu,
in my case I've created the following file:
/opt/alfresco/tomcat/shared/classes/alfresco/extension/subsystems/fileServers/default/default/custom.properties
with the following content
filesystem.name=Repository
protocols.rootPath=/app:company_home/st:sites/cm:ftp-root/cm:documentLibrary
Where:
filesystem.name stands for the name of the folder i can find as root directory when connected via FTP client
and
protocols.rootPath is the the folder of the site where I want the users lands when connected via FTP
Hope it helps.
A.
Explore our Alfresco products with the links below. Use labels to filter content by product module.