Could I ask the best way to restrict access to download of files in specific directories (e.g site/files/pdf/file.pdf) to specific user groups?

I can restrict access to the pages that reference the file, but am struggling with how to restrict access if the url for the file is requested directly

The fileshare module seems to be appropriate, but that is withdrawn currently due to security issues

Thanks
Michael

Comments

jdsaward’s picture

You might try the Private Uploads Module: http://drupal.org/project/private_upload

It does not allow restriction via specific directories, but it does add a 'private' checkbox to the uploads form, and thus you might, for example, mark all pdf files as private, and leave other files as public.

Then only users with "view uploaded files" permission would be able to access the files (and in fact, all private files). I do not know though, how to add more granularity than that.

michaeltt’s picture

It does what I want. I can use the taxonomy access to restrict access to the page.
Michael