I have been at this for a while trying to achieve multiple private sub-directories that contain files only available to certain user roles.
I have successfully made the entire files/private/ directory only available to user-roles that I define using Content Access and http://drupal.org/project/private_files_download_permission.
I do know that all private files have to go through drupal because these files are private.
I am uploading all files with the upload destination in the content type set to "private file" and the default download method set (in admin/config/media/file-system) set to private files.
When I upload a file, the files are organized exactly where I want them to be in the different directories under "files/private".
I am looking for a way to fine-tune the private directory so that a user with "music" roles can ONLY download any files under "files/private/music, and NOT download anything under the pictures or movies folders.
Possible solutions: in the .htaccess file, define specific user permissions in specific directories. This would be great however I am not clear on how to go about doing this.
If anyone has suggestions on how to permit download access to sub-directories in the "files/private" folder that would be great. Thanks in advance.
Note: I attached three pictures to demonstrate what I am trying to do.
| Comment | File | Size | Author |
|---|---|---|---|
| finder.png | 37.71 KB | scottieh20 | |
| filetree.png | 64.11 KB | scottieh20 | |
| user roles.png | 110.53 KB | scottieh20 |
Comments
Comment #1
joelstein commentedI'm still not sure the best way to deal with private files. However, there's a discussion at #1185198: Private Files not being retrieved which deals with private files, so I'm marking this as duplicate.
Comment #1.0
joelstein commentedadded ONLY download files...