We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10525
    • 247 Posts
    I ran through Menno Pietersen's very good tutorial on ACL's and cusomising manager access (http://www.youtube.com/watch?v=PKdBvhmZtIw).

    I created a new user, permissions etc, and also a new Media Source ("Uploads") so that I can restrict access to the file system. Everything worked pretty much as expected except when I logged in as the new restricted admin user and tried to upload a file. The File Manager window opened ok and I selected a file, but couldn't upload. It gave me a "Permission Denied" message. Hmmm.

    It turned out that I simply hadn't selected my "Uploads" Media Source from the dropdown under the Files tab! A silly error.

    However, instead of the "Uploads" (and only available) Media Source being selected for the user, the dropdown displays a "1". Under it is shown a folder called "Media". if I open the dropdown I can select my "Uploads" Media Source and all folders and files in that are displayed ok. I can also upload files ok.

    But why the "1" and the "Media" dir?

    Can anybody tell me what these are and how to make them disappear so that the correct Media Source is shown by default?
      • 44234
      • 219 Posts
      I expect there is an issue with the usergroup permissions. Make sure the 'Filesystem' media source is removed from your 'restricted admin' usergroup.

      Default media source has to be added to each indivual user I'm afraid. Add the setting below to EACH user that is in the 'restricted admin' usergroup.

      KEY: default_media_source
      NAME: setting_default_media_source
      VALUE: ID Number of the desired media source
        Find me on Twitter, GitHub or Google+
        • 10525
        • 247 Posts
        David, I think you are correct here. I added this setting to the user and the spurious 1 has been replaced by the "Uploads" Media Source, selected by default in the dropdown.

        However, when I refresh that page, I see "Uploads" selected in the dropdown but a directory below it called "Media" with subdirectories "images" and "pdf":
        v Media
        __> images
        __> pdf
        I have no idea where this "Media" directory is from (there is no actual dir called that), but the two subdirectories are the subdirs in my "Uploads" Media Source.

        If I actually select "Uploads" from the dropdown (instead of it being there by default), I now see in the tree:
        v Uploads
        __> images
        __> pdf
        I can view files within these dirs in both instances. It is as if Media is an alias of Uploads.

        Anyone know why this is?

        I am becoming quite confused about Media Sources, access to users, relative paths and accessing (image) files within Media Sources by TVs....
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          I think "Media" is some kind of default fallback somewhere, as I will occasionally get that in the File Manager for the default Filesystem source, but re-loading a few times will suddenly change it to "Filesystem". I don't know where it comes from, though, what with all the ExtJS and Smarty stuff in the way.
            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
            • 10525
            • 247 Posts
            Yes, it looks like some kind of default alias. I can deal with this, but I don't really want clients to have to because it makes the manager look flaky and I'm already having to convince them that other instances of apparent flakiness are under my control :-/
              • 44234
              • 219 Posts
              Don't know where it's set either I'm afraid. Not sure if its related in any way to this bug:

              http://tracker.modx.com/issues/6577
                Find me on Twitter, GitHub or Google+