-
☆ A M B ☆
- 1,780 Posts
If I'm not incorrect, the only media source available right now is the main filesystem. I'm not aware that what you're trying to do will work the way you're attempting (even if it makes sense). Rather, you'll want to create a usergroup and roles for media source users, and restrict access to just that folder. But use the default media source "filesystem".
I suggest taking a long undisturbed walk through
http://rtfm.modx.com/display/revolution20/Security
And another leisurely stroll at Bob's Guides
http://bobsguides.com/revolution-permissions.html
If you click on the menu at Bob's Guides, under MODX Permissions are two sets of tutorial links. Check those out too.
-
☆ A M B ☆
- 26 Posts
Hmmm ... OK ... but the system offers me the option to 'duplicate' the filesystem media source, so if it not to do what I am attempting, then what purpose does it serve?
I have worked through the security elements a number of times and in that regard my setup is working in so far as I have set up user profiles that can ONLY see my new media source and cannot see the filesystem media source. But that is a red herring here as even as admin I get no files in my new media source.
Re: Bobs guides they are terrific - and I have bought the book as well - thanks Bob - but his tutorial relates to tree_root_id which as I read it relates to resources; I want to restrict access to the files in filesystem, not resources and in any case, his note at the top of the page indicates that it is deprecated from 2.2 (which I am using), which I assume to be that it is replaced by media sources.
Very greteful for the response as always on the forum, but not sure we've got to the bottom of this one yet (at least in my mind). Will carry on trying a few more things ....
Tim
Media Sources are definitely the way to go.
It might be a problem with the file permissions or ownership.
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
-
☆ A M B ☆
- 26 Posts
Ok ... I can add some more to this.
If I select my media source (logged in as either admin or other user makes no difference) and I try to upload a file to a directory (right clicking on a directory in my media source tree) and then select to upload a file, it fails with an error in the notes column of the upload panel saying 'the specified directory is not a directory'.
Any ideas why in a media source it doesn't consider these directories to be directories, where in the filesystem (from which I have simply duplicated) it all works fine?
Tim
-
☆ A M B ☆
- 26 Posts
Sorry to add as well even if I create a new directory using my media source tree and then try to upload files it also fails with the same - so it doesn't see directories created from within the tree itself as being directories?
Can you upload files to *any* directory using the Media Source tree?
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
Have you checked the permissions and ownership on the upload directory?
It might help to know if the FileUpload snippet works for you. If not, the problem doesn't have anything to do with Media Sources.
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
-
☆ A M B ☆
- 26 Posts
RESOLVED:
The basepath and baseurl settings must have trailing /
(May be a thought to put a check into the code for this at some stage so that it puts it on if the user has forgotten to put it on ....)
Hope the post helps any others that may fall into the trap and thanks for your assistance Bob.
Tim