We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22019
    • 390 Posts
    I know I can customise filemanager_path at a system and context setting, and it works. I’m trying to do the same at a user level and it’s not working. Is there anything else I need to change or be aware of? This particular user has a custom access policy, and can see all of the file tree, whereas I’m trying to get them to only see ’/assets/client/’



    Edited to clarify title.
      Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
      • 9102 ☆ A M B ☆
      • 318 Posts
      Odd, I’ve done this and it works fine for me. I don’t know of anything else I did to make it work, just set filemanager_path for the user in question and that’s all they see.
        • 3749
        • 24,544 Posts
        It worked for me too when I last tested it. Be sure you’re spelling the User Setting right when you create it: filemanager_path. And try pasting the value from your context setting that works.
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 3866 ☆ A M B ☆
          • 350 Posts
          I’m using 2.0.7 and whilst I can add a permission to a policy I don’t quite see where you specify the filemanager_path. I have the same requirement as odeclas.

          thanks
            Helen Warner
            Number one pixel!
            Proud to be linked with MODX at Crimson Pixel
            • 22019
            • 390 Posts
            I’m setting it at Security > Manage Users, select user -> Update User, then ’Settings’ tab, ’Create new’. Then adding this:

            key: filemanager_path
            name: setting_filemanager_path
            lexicon: file
            value: /assets/components/IAG/
            description: setting_filemanager_path_desc


            which is exactly how I’ve done it at a context level. I’ve flushed permissions, logged out users, cleared cache, but can’t get it to start the file tree at /assets/components/IAG/ . Instead the user can see /assets, /core, /connectors etc.




              Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
              • 9102 ☆ A M B ☆
              • 318 Posts
              Specify the full path, not the path relative to webroot. This should look something like /home/yourusername/public_html/assets/components/IAG/

              Edit to note: this applies generally to settings called "path." If the setting is a URL it’s generally relative to the web root, but if it’s a file path it should be the full absolute path of the directory on your server.
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Indeed, that was one of the more difficult things for me when I first started web development nearly 15 years ago. Web root is not server root! / can mean either, and it depends on the context. URL = web root (where the web server looks to start; usually www or htdocs or public_html). Path = server root, which is the beginning of the server’s file system. Linking to an image uses URL; including a file in PHP code uses path. XML and Javascript can be really difficult in this regard. Those still trip me up frequently.

                Even the "relative" part can get complicated; most things MODx are relative to where the index.php file is located (whether front-end or manager/index.php is another thing to watch out for). Images used in .css files, however, are relative to the .css file itself. This can be confusing if you have a .css file, and have some CSS in your template as well.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 22019
                  • 390 Posts
                  Nope - it’s not having any of it. Have you guys _definitely_ got in working in 2.0.7?

                  I’ve tried filemanager_path relative to base_path.
                  I’ve tried filemanager_path absolute with filemanager_path_relative set to no
                  Tried setting the deprecated rb_base_dir to the desired filemanager_path

                  This install has been upgraded incrementally from v.2.0.0 to the current 2.0.7 and the user in question has a custom access policy. I tried to set a filemanager_path on the admin user to see if it was policy-related, but no dice.

                  Finally, I set the exact same setting / params in System settings I’m trying to set for the user and it worked as expected. I give up.
                    Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
                    • 3866 ☆ A M B ☆
                    • 350 Posts
                    I’m having the same problem and have tried a variety of paths for a specific user but to no avail - is
                    there a permission that should or should not be allowed that will make this work?
                      Helen Warner
                      Number one pixel!
                      Proud to be linked with MODX at Crimson Pixel
                      • 8643
                      • 271 Posts