We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46175
    • 4 Posts
    Hi,
    I'm new here, trying to finish my first website in MODx.
    At the moment, I need to give a directory to my users to upload images, and it would be nice to hide everything they don't need.

    First, I created an Editors group and 2 users as explainedhere: https://forums.modx.com/?action=thread&thread=60371.0%3Bwap&i=1

    Then I followed the "Creating a Media Source for Clients Tutorial" (http://rtfm.modx.com/revolution/2.x/administering-your-site/media-sources/securing-a-media-source/creating-a-media-source-for-clients-tutorial)

    As a result, I now have the two desired Media Sources (the default "Filesystem" and my newly created "Client Files"), and I can access both of them as the administrator. But if I log in as my customer (Editor1), all I can see is a dumb "Media" folder icon that appears in the "Client Files" Media Source. Also, according to the tutorial, I should now have 2 Media Sources for Editor1: "Filesystem" (inaccessible) and "Client Files" (accessible), but I only have "Client Files".

    So, I have the following:
    Media Sources:
    1. "Filesystem" with Access Permissions: Group: Administrator; Minimum Role: Member-9999; Policy: Media Source Admin.
    2. "Client Files" with Access Permissions: Group: Editors Group; Minimum Role: Member; Policy: Media Source Admin.

    Media Source Admin policy has copy, create, list, load, remove, save, and view permissions -- all of them enabled.
    "Editors Group" has the following users: Editor1, Editor2 (For both, Role: "Editor-900")
    Context Access for the "Editors Group": web: "Editor-900"; Access Policy: "Content Editor"
    mgr: "Editor-900"; Access Policy: "Content Editor"

    When I expand the "+" sign next to "web" or "mgr", all the possible permissions of Content Editor Access Policy are listed, although only the following are enabled:

    change_profile, class_map, countries, delete_document, edit_document, file_create, file_list, file_manager, file_remove, file_tree, file_update, file_upload, file_view, frames, help, home, list, load, logout, menu_reports, menu_site, menu_support, menu_tools, menu_user, new_document, new_document_in_root, new_weblink, publish_document, purge_deleted, resource_duplicate, resource_tree, save, save_document, source_view, tree_show_resource_ids, undelete_document, unpublish_document, view, view_document, view_tv, view_unpublished


    MODx version: Revolution 2.2.10-pl (traditional)

    Can anyone suggest where and what to look for? Thanks in advance.

    This question has been answered by multiple community members. See the first response.

    • discuss.answer
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Is there anything in the Client Files directory? That "Media" folder name is always there like that, I'm not sure why it's called that.
        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
        • 46175
        • 4 Posts
        Thank you, sottwell, for the reply.
        Yes, there are some picture files already, and I can see them if I log in as the admin.
        As suggested in the tutorial, I logged into the server, and manually created directories:
        assets/files
        assets/files/images.

        Then I copied some files to assets/files/images, then recurively gave user and group ownership to Apache (www:www), and then recursively gavge 777 permissions. assets/files is the root directory for my "Client Files", and there's one subdirectory: images, with some image files inside. If I login to MODx Manager as the admin, I can see this "images" directory inside "Media", and the files within "images".

        I just tried to log in as Editor1, and I was able to upload a file which admin also sees. But Editor1 still doesn't see anything else than that file. [ed. note: brewer last edited this post 12 years, 8 months ago.]
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Are the permissions the same on the file editor1 uploaded, and the others that you uploaded previously?
            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
            • 46175
            • 4 Posts
            No, the permissions of the files I uploaded as Editor1 are more restrictive:
            www:wheel 644

            And they are exactly the same if I upload files as admin. And I can access those files in the "files" directory as Editor1; the problem appears to be that I can't see the "images" subdirecory, nor I can create any subdirectories.
            • discuss.answer
              • 46175
              • 4 Posts
              I think I sorted it out. When I created the users, I applied the Content Editor Access Policy, checked all the file permissions, but here I also need all the directory permissions. It works now! I can manipulate with files and subdirectories as I want. Than you, sottwell, you suggested me to experiment with root directory.