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.

CommentFileSizeAuthor
finder.png37.71 KBscottieh20
filetree.png64.11 KBscottieh20
user roles.png110.53 KBscottieh20

Comments

joelstein’s picture

Status: Active » Closed (duplicate)

I'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.

joelstein’s picture

Issue summary: View changes

added ONLY download files...