MODX Community

Content Editor can't see folders in new Media Source

Hi. I’m learning how to set up users with different roles. I’ve created a test editor user and given it the Member role and Content Editor access. I’ve tweaked the Content Editor access policy to my liking.

Everything is working perfectly except for one thing…

The editor user can see the new media source I created (looking at an existing folder), can upload and delete files in that folder but cannot see the sub-folders or the files in them.

In my Filesystem, I have folders like this:

- Filesystem
--- assets
----- [various folders]
----- content
------- Documents
------- Images
--------- [sub-folders with images in]

I created a new media source called ‘Content’ and set the basePath and baseUrl both to ‘assets/content’. When logged in as an admin, I see the ‘Content’ media source in the Files tree and I can expand it to see the ‘Documents’ and ‘Images’ sub-folders and them expand /access them in turn…

admin-view

However, if I log in as the editor, I can see the ‘Content’ media source, I can upload and delete files but I can’t see the sub-folders…

editor-view

I thought the issue might be that the sub-folders and images were already there before i created the new media source. So I’ve been into cPanel and set the permissions on the content folder and below to 777. The assets folder above has 775. I’ve cleared cache, flushed permissions, etc. and I’ve looked through the Content Editor access policy thoroughly.

It’s clearly a permissions error or oversight somewhere but I just can’t figure it out. Can anyone help?

Thanks.

PS I’m using MODX Revo 2.7.3.

Probably the permission directory_list is missing.

On many hosts, 755 is the correct permission for folders (and 644 for files). Often, setting them to 777 makes them less accessible.

Even if it works, setting them to 777 introduces serious security vulnerabilities.

That’s the one. All the searching through that long list and I missed the one that actually mentions subdirectories!

Many thanks, halftrainedharry.

Thanks for the advice, bobray.

I hadn’t changed the file permissions so they’ve stayed at 644. And I’ve changed the folders back to 755, as you’ve recommended, so they’re not vulnerable. (I only changed them to 777 because it’s suggested in a MODX Docs tutorial on Creating a Client Media Source.)

So, with your advice and halftrainedharry’s solution. everything works as intended and is secure. Thanks.

I’m glad you got it sorted – Halftrainedharry deserves at least 99% of the credit. :wink:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.