cancel
Showing results for 
Search instead for 
Did you mean: 

FTP Home Folder

dsupina
Champ in-the-making
Champ in-the-making
How to set up system to provide auto login to home folder (eg. Alfresco/User Homes/username/) when users acces Alfresco via FTP?
I tried to activate homeFolder in file-servers.xml like bellow, but with no sucess. Users still get in root folder, not in home folder.
Alfresco 3.4.a on CentOS 5.5.

Thanks!


config evaluator="string-compare" condition="Filesystems">
   
   <homeFolder>
    <store>workspace://SpacesStore</store>
    <rootPath>/app:company_home/app:user_homes</rootPath>
    <urlFile>
        <filename>__Alfresco.url</filename>
        <webpath>http://${localname}:8080/alfresco/</webpath>
    </urlFile>
    <offlineFiles/>
    <desktopActions>
        <global>
            <path>alfresco/desktop/Alfresco.exe</path>
            <webpath>http://${localname}:8080/alfresco/</webpath>
        </global>
        <action>
            <class>org.alfresco.filesys.smb.server.repo.desk.CheckInOutDesktopAction</class>
            <name>CheckInOut</name>
            <filename>__CheckInOut.exe</filename>
        </action>
        <action>
            <class>org.alfresco.filesys.smb.server.repo.desk.JavaScriptDesktopAction</class>
            <name>JavaScriptURL</name>
            <filename>__ShowDetails.exe</filename>
            <script>alfresco/desktop/showDetails.js</script>
            <attributes>anyFiles</attributes>
            <preprocess>copyToTarget</preprocess>
        </action>
    </desktopActions>
</homeFolder>
    
    <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>

               <!– Other desktop actions which may be enabled –>
               <!–
                <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 stores filter can be any of the following: normal, site, staging, author, preview –>
         <avmfilesystem name="AVM">
            <virtualView stores="site,staging,author"/>
         </avmfilesystem>
          
      </filesystems>
   </config>

   <config evaluator="string-compare" condition="Filesystem Security">
   <authenticator type="alfresco">
   </authenticator>     
<!– Domain mappings used for passthru authentication routing              –>
      <!– Used when the client does not provide a domain name in the NTLM logon –>
      <!–
      <DomainMappings>
          <Domain name="ALFRESCO" subnet="192.168.1.0" mask="192.168.1.255"/>
      </DomainMappings>
      –>
     
      <!– Custom share mapper when multi-tenancy is enabled –>
      <!–
      <shareMapper type="multi-tenant">
        <debug/>
      </shareMapper>
      –>
     
      <!– Global access control list                                                                    –>
      <!– Applied to all filesystems that do not have an <accessControl> block                          –>
      <!– Access type of 'none' will stop the filesystem from showing up for that user/address/protocol –>             
      <!–
      <globalAccessControl default="None">
         <user name="admin" access="Write"/>
         <address ip="192.168.1.2" access="Write"/>
      </globalAccessControl>
      –>
   </config>

</alfresco-config>
10 REPLIES 10

romschn
Star Collaborator
Star Collaborator
Hi,

Good news for you. No customization would be required to achieve this functionality.

We can achieve this by handling appropriate permission for users on spaces in alfresco.

You need to do below things.
1. Need to specify the root folder path as below :  in the file
    <property name="rootDirectory">
     <value>/Alfresco/User Homes</value>
    </property>

2. You need to manage the permission on spaces.
    e.g. Remove the EVERYONE users from user's own home spaces.
     i.e User-1's home space should have only User-1 under manage space users dialog.
          User-2's home space should have only User-2 under manage space users dialog.

this way, when user-1 logs in through FTP, he will directly be navigated to User Homes folder. Despite of being all the users individual user home spaces are present under this folder, as user-1 has access to only User-1's home space, he can only see his own home space.

Hope this helps.

Thanks,